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
Base Class:     <type 'type'>
String Form:    <type 'numpy.dtype'>
Namespace:      Interactive
File:           c:\python24\lib\site-packages\numpy\__init__.py
Docstring:
    <no docstring>

Cheers,

Albert

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:numpy-
> [EMAIL PROTECTED] On Behalf Of Martin Wiechert
> Sent: 15 September 2006 16:14
> To: numpy-discussion
> Subject: [Numpy-discussion] PyArray_DescrConverter - alignment /
> trailingunused bytes
> 
> Hi list,
> 
> I'm using PyArray_DescrConverter with a dict object to create a "struct-
> like"
> dtype from C.
> As the struct contains different data types I run into "unaligned access"
> problems.
> Is there a way to force alignment or to get trailing unused bytes in the
> dtpye?
> 
> Thanks, Martin


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to