Re: [Numpy-discussion] ndarray allocation question

2007-04-10 Thread David Doukhan
2007/4/10, Travis Oliphant <[EMAIL PROTECTED]>: > David Doukhan wrote: > > >Sorry, i thought doing the following lines: > > > >clib = ctypes.cdll.LoadLibrary("./libtest.so") > >dt = numpy.dtype({'names' : ['x'], 'formats' : [N.float32]}, align=67) > >myarray = numpy.empty((5,6,7),dtype=dt) > > > >w

Re: [Numpy-discussion] ndarray allocation question

2007-04-10 Thread Travis Oliphant
David Doukhan wrote: >Sorry, i thought doing the following lines: > >clib = ctypes.cdll.LoadLibrary("./libtest.so") >dt = numpy.dtype({'names' : ['x'], 'formats' : [N.float32]}, align=67) >myarray = numpy.empty((5,6,7),dtype=dt) > >would create an array such than when doing : > >my_pointer = myarr

Re: [Numpy-discussion] ndarray allocation question

2007-04-10 Thread David Doukhan
2007/4/10, Travis Oliphant <[EMAIL PROTECTED]>: > David Doukhan wrote: > > Hi! > > I'm writing you this mail because I would like to do "advanced" use of > > ndarray memory allocation. > > > > So here is a short description of my problem: > > > > I'm interfacing multidimensionnal Numpy array to C u

Re: [Numpy-discussion] ndarray allocation question

2007-04-09 Thread Travis Oliphant
David Doukhan wrote: > Hi! > I'm writing you this mail because I would like to do "advanced" use of > ndarray memory allocation. > > So here is a short description of my problem: > > I'm interfacing multidimensionnal Numpy array to C using the ctypes > module. For now, there is no problem. > The

[Numpy-discussion] ndarray allocation question

2007-04-09 Thread David Doukhan
Hi! I'm writing you this mail because I would like to do "advanced" use of ndarray memory allocation. So here is a short description of my problem: I'm interfacing multidimensionnal Numpy array to C using the ctypes module. For now, there is no problem. The C program that will use the pointer to