Alan G Isaac wrote:

>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.)
>  
>
The flatiter object didn't have comparisons implemented so I guess it 
was using some default implementation.  This is quite confusing and 
option 2 does make sense (an array of resulting comparisions is returned).

Thus now:

 >> x=arange(3).flat
 >>> x>2
array([False, False, False], dtype=bool)
 >>> x>1
array([False, False, True], dtype=bool)
 >>> x>0
array([False, True, True], dtype=bool)


-Travis




Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to