[Numpy-tickets] [NumPy] #725: Comparing string arrays to scalar numbers returns a single boolean value instead of an array of booleans
NumPy
numpy-tickets@scipy....
Mon Apr 7 18:18:10 CDT 2008
#725: Comparing string arrays to scalar numbers returns a single boolean value
instead of an array of booleans
------------------------+---------------------------------------------------
Reporter: rkern | Owner: oliphant
Type: defect | Status: new
Priority: normal | Milestone: 1.0.5
Component: numpy.core | Version: none
Severity: normal | Keywords:
------------------------+---------------------------------------------------
{{{
In [10]: array(['foo', 'barbaz']) == 0
Out[10]: False
In [11]: array([1,2]) == 0
Out[11]: array([False, False], dtype=bool)
}}}
This has downstream effects; {{{isreal()}}} is implemented as {{{imag(x)
== 0}}}.
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/725>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list