[Numpy-discussion] embedded PyArray_FromDimsAndData Segmentation Fault
Stéfan van der Walt
stefan@sun.ac...
Wed May 14 18:27:36 CDT 2008
Hi Thomas
2008/5/15 Thomas Hrabe <thrabe@burnham.org>:
> PyArray_FromDimsAndData(dimensions,size,NPY_DOUBLELTR,(char*)value);
> //TROUBLE HERE
I didn't know a person could write a stand-alone program using NumPy
this way (can you?); but what I do know is that FromDimsAndData is
deprecated, and that it can be replaced here by
PyArray_SimpleNewFromData(dimensions, size, NPY_CDOUBLE, value);
where
npy_intp* size = malloc(sizeof(npy_intp)*2);
Regards
Stéfan
More information about the Numpy-discussion
mailing list