From d725cd259d67224009eb67a52dba1f849ddc5240 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 1 Oct 2020 12:30:55 +0300 Subject: [PATCH] bos #20133 Wrap numpy-dependent code with preprocessor check --- src/MEDCoupling_Swig/DataArrayInt.i | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.2