[NumPy-Tickets] [NumPy] #2130: array() with subok=True broken with subclass in nested sequence

NumPy Trac numpy-tickets@scipy....
Thu May 10 22:04:24 CDT 2012


#2130: array() with subok=True broken with subclass in nested sequence
------------------------+---------------------------------------------------
 Reporter:  rmay        |       Owner:  somebody   
     Type:  defect      |      Status:  new        
 Priority:  normal      |   Milestone:  Unscheduled
Component:  numpy.core  |     Version:  devel      
 Keywords:              |  
------------------------+---------------------------------------------------
 # The following works fine:
 import numpy as np
 a = np.ma.array([1,2,3])
 print a
 # masked_array(data = [1 2 3],
 #              mask = False,
 #        fill_value = 999999)
 print np.array(a, subok=True)
 # masked_array(data = [1 2 3],
 #              mask = False,
 #        fill_value = 999999)
 # This is broken
 print np.array([a], subok=True)
 #array([[1, 2, 3]])

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


More information about the NumPy-Tickets mailing list