[Numpy-tickets] [NumPy] #321: Semantic difference in formats and dtype parameters in rec.fromarrays

NumPy numpy-tickets at scipy.net
Thu Oct 5 13:56:24 CDT 2006


#321: Semantic difference in formats and dtype parameters in rec.fromarrays
--------------------+-------------------------------------------------------
 Reporter:  faltet  |        Owner:  somebody
     Type:  defect  |       Status:  closed  
 Priority:  normal  |    Milestone:          
Component:  Other   |      Version:          
 Severity:  normal  |   Resolution:  invalid 
 Keywords:          |  
--------------------+-------------------------------------------------------
Changes (by oliphant):

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

Comment:

 There is a semantic difference between dtype and formats.  It is intended.

 To get the effect you want you need to add a comma to the end of dtype.
 When you enter formats it is assumed you want fields.  The dtype argument
 is more general and does not necessarily assume fields.

 Thus formats="(2,)i4" is equivalent to dtype="(2,)i4,"

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/321#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