[Numpy-discussion] A couple more Numeric incompatibilitiesand apossible bug

Gary Ruben gazzar at email.com
Tue Mar 30 01:16:11 CST 2004


Thanks for pointing this out Alexander,
I admit that I hadn't tried any native Python container types to see how they behave. I was basing my comments on
Numeric's behaviour. When I have time, maybe I should raise a question on the Python developer's list. It seems like something that may have been overlooked.

regards,
Gary

----- Original Message -----
From: Alexander Schmolck <a.schmolck at gmx.net>
Date: Mon, 29 Mar 2004 13:52:20 +0100
To: "numpy-discussion" <numpy-discussion at lists.sourceforge.net>
Subject: Re: [Numpy-discussion] A couple more Numeric incompatibilitiesand apossible bug

> "Gary Ruben" <gazzar at email.com> writes:
> > In summary, I think te behaviour should be
> >>>> print str(ArrayOfErr([909., 802., 677., 585.], 1.0))
> > [909.0 +1.0/-1.0  802.0 +1.0/-1.0  677.0 +1.0/-1.0  585.0 +1.0/-1.0 ]
> >
> >>>> print repr(ArrayOfErr([909., 802., 677., 585.], 1.0))
> > ObjectArray([Err(909.0,1.0,1.0), Err(802.0,1.0,1.0), Err(677.0,1.0,1.0), Err(585.0,1.0,1.0)])
> 
> Such behavior would seem sensible, but I don't think it's what the builtin
> collections do (not sure why):
> 
> >>> n = 1.1
> >>> n
> 1.1000000000000001
> >>> [n]
> [1.1000000000000001]
> >>> str(n)
> '1.1'
> >>> str([n])
> '[1.1000000000000001]'
> 
> 
> 'as


-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm





More information about the Numpy-discussion mailing list