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

NumPy Trac numpy-tickets@scipy....
Tue Feb 8 13:12:38 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 m-paradox):

 The object array creation code should consistently get maximum depth now.
 These are the kinds of things I get:

 {{{
 >>> array([array([], dtype=float64), array(0, dtype=object)],
 dtype=object).shape
 (2,)
 >>> array([[],[]], dtype=object).shape
 (2, 0)
 >>> array([[],[[]]], dtype=object).shape
 (2,)
 >>> array([[[]],[[]]], dtype=object).shape
 (2, 1, 0)
 >>> array([[[]],[[]],[]], dtype=object).shape
 (3,)
 >>> array([[3],[[]],[[]]], dtype=object).shape
 (3, 1)
 }}}

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


More information about the NumPy-Tickets mailing list