Hi,
I noticed in 
numpy/numarray/_capi.c: NA_NewAllFromBuffer()

a) the original numarray function could create arrays of any (ndim) shape,
while PyArray_FromBuffer()  looks to me that the returned array is always 1D.

b) in the code part
<selected lines from code>
 npy_intp size = dtype->elsize;
 for ... 
size *= self->dimensions[i];
 PyArray_FromBuffer(bufferObject, dtype, size, byteoffset);
</selected lines from code>

Is "size" here a muplitple of the itemsize !?   I think I got a crashed (my 
code) that I fixed when I set size to (the equivalent of) N.prod(array.shape)

Cheers,
Sebastian Haase


-------------------------------------------------------------------------
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