[Numpy-tickets] [NumPy] #315: Inconsistencies with sequence parameters

NumPy numpy-tickets at scipy.net
Thu Oct 5 00:04:02 CDT 2006


#315: Inconsistencies with sequence parameters
------------------------+---------------------------------------------------
 Reporter:  faltet      |        Owner:  somebody   
     Type:  defect      |       Status:  closed     
 Priority:  normal      |    Milestone:  1.0 Release
Component:  numpy.core  |      Version:  devel      
 Severity:  normal      |   Resolution:  invalid    
 Keywords:              |  
------------------------+---------------------------------------------------
Changes (by oliphant):

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

Comment:

 This is a similar issues as before.  When fields are defined in a data-
 type object you have two options:

 1) Use tuples to indicate placement of objects into sub-fields
 2) Use an object exposing the buffer interface to place raw data into the
 fields.

 In this example you are creating a (2,)-shaped array with (total) itemsize
 4 and then passing in the string "aaa" which will be interpreted as a
 buffer and used to initialize the first element of size 4.  The "x" string
 will be copied over into the second element.

 Recarray's are different in that they allow you to use lists or tuples.
 This copies numarray behavior.  I'd rather that they just use tuples to
 represent a record, but numarray has used lists and so so do rec arrays.

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/315#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list