[NumPy-Tickets] [NumPy] #2004: NA incompatible with astype method.

NumPy Trac numpy-tickets@scipy....
Thu Dec 22 22:04:42 CST 2011

#2004: NA incompatible with astype method.
 Reporter:  charris     |       Owner:  somebody   
     Type:  defect      |      Status:  new        
 Priority:  normal      |   Milestone:  Unscheduled
Component:  numpy.core  |     Version:  devel      
 Keywords:              |  
 To wit:

 In [13]: x = ones(5, maskna=1)

 In [14]: x[2] = NA

 In [15]: x.astype(double)
 ValueError                                Traceback (most recent call
 /home/charris/<ipython-input-15-c95438174230> in <module>()
 ----> 1 x.astype(double)

 ValueError: Cannot assign NA to an array which does not support NAs


 I suspect the easiest thing to do here is propagate the MASKNA flag.

Ticket URL: <http://projects.scipy.org/numpy/ticket/2004>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list