numpy.where() and multiple comparisons

John Ladasky john_ladasky at sbcglobal.net
Fri Jan 17 23:00:20 EST 2014


On Friday, January 17, 2014 6:16:28 PM UTC-8, duncan smith wrote:

>  >>> a = np.arange(10)
>  >>> c = np.where((2 < a) & (a < 7))
>  >>> c
> (array([3, 4, 5, 6]),)

Nice!  Thanks!

Now, why does the multiple comparison fail, if you happen to know?




More information about the Python-list mailing list