[Numpy-discussion] Is this a bug in repr ?
Mark Sienkiewicz
sienkiew@stsci....
Tue Mar 15 13:10:41 CDT 2011
Robert Kern wrote:
> On Tue, Mar 15, 2011 at 12:39, Charles R Harris
> <charlesr.harris@gmail.com> wrote:
>
>
>> Yes, I think it is a bug. IIRC, it also shows up for object arrays.
>>
>
> It's extremely long-standing, documented, intentional behavior dating
> back to Numeric.
>
> [~]
> |1> import Numeric
>
> [~]
> |2> a = Numeric.array( [ 16.50698631688883822 ] )
>
> [~]
> |3> print repr(a)
> array([ 16.50698632])
>
>
> You can disagree with the feature, but it's not a bug.
>
So it is needed to maintain backward compatibility? (Still?)
In that case, would you agree that it is a bug for
assert_array_almost_equal to use repr() to display the arrays, since it
is printing identical values and saying they are different? Or is there
also a reason to do that?
More information about the NumPy-Discussion
mailing list