Visual Studio 2019 (compiling with 2017 64 bit)
This code
... (code before that runs fine)...
PyArrayObject* extents = NULL;
npy_intp extent_dims[] = { 2, 2, 0 };
try {
extents = (PyArrayObject*)PyArray_SimpleNew(2, extent_dims, PyArray_DOUBLE);
if (extents == NULL) {
printf("error \n");
}
}
catch (...) {
printf("catch\n");
}
printf("I am here\n");
The statement
extents = (PyArrayObject*)PyArray_SimpleNew(2, extent_dims, PyArray_DOUBLE);
appears to fail silently, exits the Python interpreter. Any ideas?