Commit c38edbb9 authored by Mat's avatar Mat
Browse files

Workaround import_array() warning.

Numpy defines the import_array() macro to return void on error when
built against python2. This conflicts with the python3-friendly
definition of module_init(). In some cases, warnings are reported as
errors and the compilation of SharedArray fails there. The workaround
is to use import_array1(NULL) instead.
parent 4344d431
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ static PyObject *module_init(void)
	PyObject *m;

	/* Import numpy arrays */
	import_array();
	import_array1(NULL);

	/* Register the module */
	if (!(m = CREATE_MODULE(module_name, module_functions, module_docstring)))