RDKit
Open-source cheminformatics and machine learning.
import_array.h
Go to the documentation of this file.
1 #ifndef RDKIT_IMPORT_ARRAY_INCLUDED
2 #define RDKIT_IMPORT_ARRAY_INCLUDED
3 
4 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
5 #include <numpy/arrayobject.h>
6 
7 #if PY_MAJOR_VERSION >= 3
8 void* rdkit_import_array()
9 #else
11 #endif
12 {
13  // numpy's import_array is defined as a macro that expands into a block
14  // statement that inlines a return. In python3 it returns a NULL value
15  // (to comply with the Py_InitModule signature) so it can't be called
16  // directly from within the BOOST_PYTHON_MODULE init function (that
17  // returns void)
18  import_array();
19 #if PY_MAJOR_VERSION >= 3
20  return NULL;
21 #endif
22 }
23 
24 #endif
void rdkit_import_array()
Definition: import_array.h:10