From: vsr Date: Thu, 1 Oct 2020 09:30:55 +0000 (+0300) Subject: bos #20133 Wrap numpy-dependent code with preprocessor check X-Git-Tag: V9_6_0a2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fci%2F20133-1;p=tools%2Fmedcoupling.git bos #20133 Wrap numpy-dependent code with preprocessor check --- diff --git a/src/MEDCoupling_Swig/DataArrayInt.i b/src/MEDCoupling_Swig/DataArrayInt.i index da27feb99..e0c0070cd 100644 --- a/src/MEDCoupling_Swig/DataArrayInt.i +++ b/src/MEDCoupling_Swig/DataArrayInt.i @@ -258,10 +258,12 @@ return ret.retn(); } } +#if defined(WITH_NUMPY) else if(MEDCouplingHasNumPyBindings() && PyArray_Check(elt0) && nbOfTuples==NULL && nbOfComp==NULL) {//ARRAY.New(numpyArray) return BuildNewInstance(elt0,NPYTraits::NPYObjectType,NPYTraits::NPYFunc,MEDCoupling::Traits::NPYStr); } +#endif else throw INTERP_KERNEL::Exception(msg.c_str()); throw INTERP_KERNEL::Exception(msg.c_str());//to make g++ happy