[Numpy-tickets] [NumPy] #277: memory error in assignment to flat object array

NumPy numpy-tickets at scipy.net
Thu Sep 14 14:03:29 CDT 2006

#277: memory error in assignment to flat object array
 Reporter:  stefan      |        Owner:  somebody   
     Type:  defect      |       Status:  closed     
 Priority:  normal      |    Milestone:  1.0 Release
Component:  numpy.core  |      Version:  devel      
 Severity:  normal      |   Resolution:  fixed      
 Keywords:              |  
Changes (by oliphant):

  * status:  new => closed
  * resolution:  => fixed


 Fixed in r3155.

 Internally, the equivalent of array(obj) is called quite often.  In this
 case, it is called on the [] object so you get array([]) which returns a
 0-sized array.  The possibility that the result had size 0 was not
 checked.  There may be other places where this kind of error shows up as

 The [] and () objects are hard to set into an object array because of
 their dual interpretation as containers.  You can always use the itemset
 method or exact indexing.

Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/277>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list