Hello all
In [1]: import numpy as N
In [3]: N.dtype({'names' : ['x', 'y'],
'formats' : [N.intc, N.float64]},
align=True)
Out[3]: dtype([('x', 'i4'), ('', '|V4'), ('y', 'f8')])
The reason you might not have discovered this:
In [2]: N.dtype?
Type: type
On Friday 15 September 2006 17:53, Albert Strasheim wrote:
Hello all
In [1]: import numpy as N
In [3]: N.dtype({'names' : ['x', 'y'],
'formats' : [N.intc, N.float64]},
align=True)
Out[3]: dtype([('x', 'i4'), ('', '|V4'), ('y', 'f8')])
The reason you might
Hello all
-Original Message-
From: [EMAIL PROTECTED] [mailto:numpy-
[EMAIL PROTECTED] On Behalf Of Martin Wiechert
Sent: 15 September 2006 19:53
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion]PyArray_DescrConverter - alignment /
trailingunused bytes
On Friday
Argh
snip
One final question. To me the repr of a dtype with gaps is a little bit
puzzling:
dtype ({'names': ['a', 'b', 'c'], 'formats': ['a4', 'f8', 'f4'],
'offsets': [0, 16, 24]})
dtype([('a', '|S4'), ('', '|V12'), ('b', 'f8'), ('', '|V12'), ('c',
'f4')])
There should be
Martin Wiechert wrote:
On Friday 15 September 2006 19:14, Travis Oliphant wrote:
Martin Wiechert wrote:
Thanks Albert! Do you also know the corresponding C-API function? It
cannot be PyArray_DescrConverter (PyObject *, PyArray_Descr **), whose
signature has no align, right?
On Friday 15 September 2006 20:27, Travis Oliphant wrote:
Martin Wiechert wrote:
On Friday 15 September 2006 19:14, Travis Oliphant wrote:
Martin Wiechert wrote:
Thanks Albert! Do you also know the corresponding C-API function? It
cannot be PyArray_DescrConverter (PyObject *,