[Numpy-discussion] flatiter and inequality comparison (original) (raw)

Alan G Isaac aisaac at american.edu
Wed Jun 21 22:08:52 EDT 2006


I do not understand how to think about this:

>>> x=arange(3).flat
>>> x
<numpy.flatiter object at 0x01BD0C58>
>>> x>2
True
>>> x>10
True

Why? (I realize this behaves like xrange, so this may not be a numpy question, but I do not understand that behavior either.)

What I expected: that a flatiter object would iterate through its values and return either

Thank you, Alan Isaac



More information about the NumPy-Discussion mailing list