File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -201,11 +201,11 @@ namespace eigenpy
201201 eigenMatrix = numpyMap;
202202 }
203203 };
204-
204+ #define numpy_import_array () {if (_import_array () < 0 ) {PyErr_Print (); PyErr_SetString (PyExc_ImportError, " numpy.core.multiarray failed to import" ); } }
205+
205206 template <typename MatType,typename EigenEquivalentType>
206207 void enableEigenPySpecific ()
207208 {
208- import_array ();
209209
210210#ifdef EIGEN_DONT_VECTORIZE
211211
@@ -217,6 +217,7 @@ namespace eigenpy
217217 boost::python::to_python_converter<MatType,
218218 eigenpy::EigenToPy<MatType,MatType> >();
219219 eigenpy::EigenFromPy<MatType,MatType>();
220+ numpy_import_array ();
220221
221222 typedef typename eigenpy::UnalignedEquivalent<MatType>::type MatTypeDontAlign;
222223#ifndef EIGENPY_ALIGNED
You can’t perform that action at this time.
0 commit comments