[Numpy-discussion] "aligned" matrix / ctypes

Anne Archibald peridot.faceted@gmail....
Thu Apr 24 17:09:08 CDT 2008

On 24/04/2008, Zachary Pincus <zachary.pincus@yale.edu> wrote:

>  In the mean time, is there any way to (from within python) construct
>  an array from another array by specifying the dtype and strides? That
>  is, some other way to do the view/slice business directly?

There's the ndarray constructor, which lets you do some highly dodgy
things like create arrays whose rows overlap in memory. I would think
it would be possible to do this with that. You might also want to
think about allowing arrays to have their rows aligned (for example, a
100 by 100 array of float32s which wants 64-byte alignment for every


More information about the Numpy-discussion mailing list