Merge branch 'stable' into develop
This commit is contained in:
commit
9e03f5e944
@ -91,12 +91,12 @@ static inline PyObject *data_to_ndarray(void *data, int n_rows, int n_cols,
|
||||
// https://stackoverflow.com/questions/54269956/crash-of-jupyter-due-to-the-use-of-pyarray-enableflags/54278170#54278170
|
||||
// Note that in general it was disadvised to build all C code with MinGW on
|
||||
// Windows. We do it anyway, see if we find any problems on the way.
|
||||
PyObject *capsule = PyCapsule_New(data, LASP_CAPSULE_NAME, capsule_cleanup);
|
||||
int res = PyArray_SetBaseObject(arr, capsule);
|
||||
if (res != 0) {
|
||||
fprintf(stderr, "Failed to set base object of array!");
|
||||
return NULL;
|
||||
}
|
||||
/* PyObject *capsule = PyCapsule_New(data, LASP_CAPSULE_NAME, capsule_cleanup); */
|
||||
/* int res = PyArray_SetBaseObject(arr, capsule); */
|
||||
/* if (res != 0) { */
|
||||
/* fprintf(stderr, "Failed to set base object of array!"); */
|
||||
/* return NULL; */
|
||||
/* } */
|
||||
|
||||
PyArray_ENABLEFLAGS(arr, NPY_OWNDATA);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user