[NumPy-Tickets] [NumPy] #1081: Strange behavior of array() in a corner case

NumPy Trac numpy-tickets@scipy....
Tue Feb 8 07:47:49 CST 2011

#1081: Strange behavior of array() in a corner case
  Reporter:  GaelVaroquaux  |       Owner:  somebody   
      Type:  defect         |      Status:  reopened   
  Priority:  low            |   Milestone:  Unscheduled
 Component:  Other          |     Version:             
Resolution:                 |    Keywords:             

Comment(by charris):

 In 1d952a5 this now gives

 In [7]: array([array([]), array(0, object)], object)
 Out[7]: array([[], 0], dtype=object)

 In [8]: array([array([]), array(0, object)], object).shape
 Out[8]: (2,)

 Which has one more level of depth than

 array([array([], dtype=float64), array(0, dtype=object)], dtype=object)

 However, I think the extra level is consistent with the way numpy usually
 handles the creation of object arrays, i.e., at the greatest depth

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

More information about the NumPy-Tickets mailing list