[NumPy-Tickets] [NumPy] #1594: numpy.dtype('float64') == None returns True
NumPy Trac
numpy-tickets@scipy....
Thu Aug 26 11:03:23 CDT 2010
#1594: numpy.dtype('float64') == None returns True
-------------------------------+--------------------------------------------
Reporter: Zbyszek_Szmek | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 2.0.0
Component: Other | Version: devel
Keywords: dtype, comparison |
-------------------------------+--------------------------------------------
Automatic dtype conversion is performed when dtype object is compared with
something of different class. A special case is that None is converted to
the default dtype.
This result in surprising behavior when comparing with None:
>>> numpy.dtype('float64') == None
True
>>> numpy.dtype('float32') == None
False
This behaviour is present in numpy at least 1.3.0 - 1.5.0.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1594>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list