[Numpy-discussion] A couple more Numeric incompatibilitiesand a possible bug

Alexander Schmolck a.schmolck at gmx.net
Mon Mar 29 04:55:44 EST 2004


"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





More information about the NumPy-Discussion mailing list