Salome HOME
Numpy optionnal dependancies + getNumberOfCells porting
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingDataArrayTypemaps.i
index 31c881f06459984973d24815de3e93139cfc2174..8f596420d4ec9165d220cc30667be8469c85961e 100644 (file)
@@ -108,6 +108,7 @@ int InterpreteNegativeInt(int val, int nbelem)
     return val;
 }
 
+#ifdef WITH_NUMPY
 // this is the second type of specific deallocator, only valid for the constructor of DataArrays taking numpy array
 // in input when an another DataArray is already client of this.
 template<class MCData>
@@ -342,6 +343,9 @@ PyObject *ToNumPyArray(MCData *self, int npyObjectType, const char *MCDataStr)
 SWIGINTERN PyObject *MEDCoupling_DataArrayInt_toNumPyArray(MEDCoupling::DataArrayInt *self);
 SWIGINTERN PyObject *MEDCoupling_DataArrayDouble_toNumPyArray(MEDCoupling::DataArrayDouble *self);
 
+#endif
+
+#ifdef WITH_SCIPY
 PyObject *ToCSRMatrix(const std::vector<std::map<int,double> >& m, int nbCols)
 {
   int nbRows((int)m.size());
@@ -384,6 +388,8 @@ PyObject *ToCSRMatrix(const std::vector<std::map<int,double> >& m, int nbCols)
   return ret;
 }
 
+#endif
+
 static PyObject *convertDataArrayChar(MEDCoupling::DataArrayChar *dac, int owner)
 {
   PyObject *ret=0;