Lane Brooks wrote: > I have successfully written several extension modules that use the numpy > CAPI to manipulate numpy arrays. I have to say numpy is great. > > I am now having a problem, however, when calling numpy capi functions > when running python embedded in a third party, closed source, > application. It segfaults whenever I make any PyArray* function call. > Any ideas on why that might be happening? >
You most likely forgot to call import_array functions when initializing your extension (the PyMODULE_INIT function): with python, extensions which define new C-API does it through an array of function pointers, which is garbage before you call import_array. I have never used embedded python, so I don't know how initialization works there, but that should be similar I guess. cheers, David _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
