[NumPy-Tickets] [NumPy] #980: NaN's are silenty converted to ints

NumPy Trac numpy-tickets@scipy....
Fri Mar 25 04:20:21 CDT 2011

#980: NaN's are silenty converted to ints
  Reporter:  stefan      |       Owner:  cdavid     
      Type:  defect      |      Status:  reopened   
  Priority:  normal      |   Milestone:  Unscheduled
 Component:  numpy.core  |     Version:  devel      
Resolution:              |    Keywords:             
Changes (by rgommers):

  * status:  closed => reopened
  * resolution:  wontfix =>


 This seems to have changed from filling with 0 to -maxint, which is less
 In [1]: np.array([1.5, np.nan]).astype(np.int64)
 Out[1]: array([                   1, -9223372036854775808], dtype=int64)

 In [2]: np.array([1.5, np.nan]).astype(np.int32)
 Out[2]: array([          1, -2147483648])
 But still, this is a valid issue - should adhere to error policy. If it
 can't be fixed easily, let's leave this issue open.

Ticket URL: <http://projects.scipy.org/numpy/ticket/980#comment:3>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list