From aeb6e025e98c5432c365cfc264d1f8405d1da1f3 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 3 May 2017 10:07:03 +0200 Subject: [PATCH] A small modif --- src/MEDCoupling_Swig/MEDCouplingMemArray.i | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/MEDCoupling_Swig/MEDCouplingMemArray.i b/src/MEDCoupling_Swig/MEDCouplingMemArray.i index 4b60cc0d9..767d95696 100644 --- a/src/MEDCoupling_Swig/MEDCouplingMemArray.i +++ b/src/MEDCoupling_Swig/MEDCouplingMemArray.i @@ -52,6 +52,7 @@ %newobject MEDCoupling::DataArrayFloat::New; %newobject MEDCoupling::DataArrayFloat::iterator; %newobject MEDCoupling::DataArrayFloat::__iter__; +%newobject MEDCoupling::DataArrayFloat::convertToDblArr; %newobject MEDCoupling::DataArrayInt::New; %newobject MEDCoupling::DataArrayInt::__iter__; %newobject MEDCoupling::DataArrayInt::selectPartDef; @@ -663,6 +664,8 @@ namespace MEDCoupling } }; + class DataArrayDouble; + class DataArrayFloat : public DataArray { public: @@ -732,6 +735,12 @@ namespace MEDCoupling int nbOfComp(self->getNumberOfComponents()),nbOfTuples(self->getNumberOfTuples()); return convertDblArrToPyListOfTuple(vals,nbOfComp,nbOfTuples); } + + DataArrayDouble *convertToDblArr() const throw(INTERP_KERNEL::Exception) + { + MCAuto ret(self->convertToDblArr()); + return ret.retn(); + } PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception) { -- 2.39.2