Salome HOME
numpy bindings for dense matrix
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingCommon.i
index 8e476cce07efeceba07df89da2baab9120653f79..98c05d12b9ec93cd914922378243916abdbb03d4 100644 (file)
@@ -4849,6 +4849,13 @@ namespace ParaMEDMEM
         Py_XINCREF(trueSelf);
         return trueSelf;
       }
+#ifdef WITH_NUMPY
+      PyObject *toNumPyMatrix() throw(INTERP_KERNEL::Exception) // not const. It is not a bug !
+      {
+        PyObject *obj(ToNumPyArrayUnderground<DataArrayDouble,double>(self->getData(),NPY_DOUBLE,"DataArrayDouble",self->getNumberOfRows(),self->getNumberOfCols()));
+        return obj;
+      }
+#endif
     }
   };
 }