Salome HOME
A py3 translation of a forgotten test py file
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingMemArray.i
index 0b6ca517bc632bc65ec2afd681ada1e100d0fbb7..ce219c7749ecc698cdec2ba48a863a2a0eed7a90 100644 (file)
@@ -16,7 +16,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-// Author : Anthony Geay (CEA/DEN)
+// Author : Anthony Geay (EDF R&D)
 
 ////////////////////
 %typemap(out) MEDCoupling::DataArray*
 {
   $result=convertDataArrayChar($1,$owner);
 }
+
+%typemap(out) MCAuto<MEDCoupling::DataArrayInt>
+{
+  $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN|0);
+}
+
+%typemap(out) MCAuto<MEDCoupling::DataArrayDouble>
+{
+  $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayDouble,SWIG_POINTER_OWN|0);
+}
+
+%typemap(out) MCAuto<MEDCoupling::DataArrayFloat>
+{
+  $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayFloat,SWIG_POINTER_OWN|0);
+}
+
+%typemap(out) MCAuto<MEDCoupling::MapII>
+{
+  $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__MapII,SWIG_POINTER_OWN|0);
+}
 //$$$$$$$$$$$$$$$$$$
 
 %newobject MEDCoupling::DataArray::deepCopy;
 %newobject MEDCoupling::DataArray::selectByTupleIdSafeSlice;
 %newobject MEDCoupling::DataArray::Aggregate;
 %newobject MEDCoupling::DataArrayFloat::New;
+%newobject MEDCoupling::DataArrayFloat::iterator;
+%newobject MEDCoupling::DataArrayFloat::__iter__;
+%newobject MEDCoupling::DataArrayFloat::Meld;
+%newobject MEDCoupling::DataArrayFloat::__rmul__;
 %newobject MEDCoupling::DataArrayInt::New;
 %newobject MEDCoupling::DataArrayInt::__iter__;
-%newobject MEDCoupling::DataArrayInt::selectPartDef;
-%newobject MEDCoupling::DataArrayInt::convertToDblArr;
-%newobject MEDCoupling::DataArrayInt::convertToFloatArr;
 %newobject MEDCoupling::DataArrayInt::performCopyOrIncrRef;
 %newobject MEDCoupling::DataArrayInt::subArray;
 %newobject MEDCoupling::DataArrayInt::changeNbOfComponents;
 %newobject MEDCoupling::DataArrayInt::findIdsEqualList;
 %newobject MEDCoupling::DataArrayInt::findIdsNotEqualList;
 %newobject MEDCoupling::DataArrayInt::findIdsEqualTuple;
+%newobject MEDCoupling::DataArrayInt::findIdForEach;
 %newobject MEDCoupling::DataArrayInt::sumPerTuple;
 %newobject MEDCoupling::DataArrayInt::negate;
 %newobject MEDCoupling::DataArrayInt::computeAbs;
 %newobject MEDCoupling::DataArrayInt::findIdsInRange;
 %newobject MEDCoupling::DataArrayInt::findIdsNotInRange;
-%newobject MEDCoupling::DataArrayInt::findIdsStricltyNegative;
+%newobject MEDCoupling::DataArrayInt::findIdsStrictlyNegative;
 %newobject MEDCoupling::DataArrayInt::Aggregate;
 %newobject MEDCoupling::DataArrayInt::AggregateIndexes;
 %newobject MEDCoupling::DataArrayInt::Meld;
 %newobject MEDCoupling::DataArrayInt::buildIntersection;
 %newobject MEDCoupling::DataArrayInt::buildUnique;
 %newobject MEDCoupling::DataArrayInt::buildUniqueNotSorted;
-%newobject MEDCoupling::DataArrayInt::fromLinkedListOfPairToList;
-%newobject MEDCoupling::DataArrayInt::findIdsGreaterOrEqualTo;
-%newobject MEDCoupling::DataArrayInt::findIdsGreaterThan;
-%newobject MEDCoupling::DataArrayInt::findIdsLowerOrEqualTo;
-%newobject MEDCoupling::DataArrayInt::findIdsLowerThan;
 %newobject MEDCoupling::DataArrayInt::deltaShiftIndex;
 %newobject MEDCoupling::DataArrayInt::buildExplicitArrByRanges;
 %newobject MEDCoupling::DataArrayInt::buildExplicitArrOfSliceOnScaledArr;
 %newobject MEDCoupling::DataArrayAsciiCharTuple::buildDAAsciiChar;
 %newobject MEDCoupling::DataArrayDouble::New;
 %newobject MEDCoupling::DataArrayDouble::__iter__;
-%newobject MEDCoupling::DataArrayDouble::selectPartDef;
-%newobject MEDCoupling::DataArrayDouble::convertToIntArr;
-%newobject MEDCoupling::DataArrayDouble::convertToFloatArr;
 %newobject MEDCoupling::DataArrayDouble::performCopyOrIncrRef;
 %newobject MEDCoupling::DataArrayDouble::Aggregate;
 %newobject MEDCoupling::DataArrayDouble::Meld;
 %newobject MEDCoupling::DataArrayDouble::subArray;
 %newobject MEDCoupling::DataArrayDouble::changeNbOfComponents;
 %newobject MEDCoupling::DataArrayDouble::accumulatePerChunck;
-%newobject MEDCoupling::DataArrayDouble::cumSum;
 %newobject MEDCoupling::DataArrayDouble::findIdsInRange;
 %newobject MEDCoupling::DataArrayDouble::findIdsNotInRange;
+%newobject MEDCoupling::DataArrayDouble::findIdsStrictlyNegative;
 %newobject MEDCoupling::DataArrayDouble::negate;
 %newobject MEDCoupling::DataArrayDouble::computeAbs;
 %newobject MEDCoupling::DataArrayDouble::applyFunc;
 %feature("unref") DataArrayAsciiChar "$this->decrRef();"
 %feature("unref") DataArrayByte "$this->decrRef();"
 
+%feature("unref") MapII "$this->decrRef();"
 %feature("unref") PartDefinition "$this->decrRef();"
 %feature("unref") DataArrayPartDefinition "$this->decrRef();"
 %feature("unref") SlicePartDefinition "$this->decrRef();"
@@ -243,6 +258,12 @@ namespace MEDCoupling
     } MEDCouplingAxisType;
 
   class DataArrayInt;
+
+  class MapII : public RefCountObject, public TimeLabel
+  {
+  public:
+    static MCAuto< MapII > New();
+  };
   
   class PartDefinition : public RefCountObject, public TimeLabel
   {
@@ -558,8 +579,7 @@ namespace MEDCoupling
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::GetSlice (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
-        PySliceObject *sly=reinterpret_cast<PySliceObject *>(slic);
-        GetIndicesOfSliceExplicitely(sly,&strt,&stp,&step,"DataArray::GetSlice (wrap) : the input slice is invalid !");
+        GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArray::GetSlice (wrap) : the input slice is invalid !");
         int a,b;
         DataArray::GetSlice(strt,stp,step,sliceId,nbOfSlices,a,b);
         return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(step));
@@ -570,8 +590,7 @@ namespace MEDCoupling
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::getSlice (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
-        PySliceObject *sly=reinterpret_cast<PySliceObject *>(slic);
-        GetIndicesOfSlice(sly,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getSlice (wrap) : the input slice is invalid !");
+        GetIndicesOfSlice(slic,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getSlice (wrap) : the input slice is invalid !");
         int a,b;
         DataArray::GetSlice(strt,stp,step,sliceId,nbOfSlices,a,b);
         return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(step));
@@ -582,8 +601,7 @@ namespace MEDCoupling
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBES (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
-        PySliceObject *sly=reinterpret_cast<PySliceObject *>(slic);
-        GetIndicesOfSliceExplicitely(sly,&strt,&stp,&step,"DataArray::GetNumberOfItemGivenBES (wrap) : the input slice is invalid !");
+        GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArray::GetNumberOfItemGivenBES (wrap) : the input slice is invalid !");
         return DataArray::GetNumberOfItemGivenBES(strt,stp,step,"");
       }
 
@@ -592,8 +610,7 @@ namespace MEDCoupling
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBESRelative (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
-        PySliceObject *sly=reinterpret_cast<PySliceObject *>(slic);
-        GetIndicesOfSliceExplicitely(sly,&strt,&stp,&step,"DataArray::GetNumberOfItemGivenBESRelative (wrap) : the input slice is invalid !");
+        GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArray::GetNumberOfItemGivenBESRelative (wrap) : the input slice is invalid !");
         return DataArray::GetNumberOfItemGivenBESRelative(strt,stp,step,"");
       }
       
@@ -609,8 +626,7 @@ namespace MEDCoupling
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::getNumberOfItemGivenBES (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
-        PySliceObject *sly=reinterpret_cast<PySliceObject *>(slic);
-        GetIndicesOfSlice(sly,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getNumberOfItemGivenBES (wrap) : the input slice is invalid !");
+        GetIndicesOfSlice(slic,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getNumberOfItemGivenBES (wrap) : the input slice is invalid !");
         return DataArray::GetNumberOfItemGivenBES(strt,stp,step,"");
       }
 
@@ -619,8 +635,7 @@ namespace MEDCoupling
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::getNumberOfItemGivenBESRelative (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
-        PySliceObject *sly=reinterpret_cast<PySliceObject *>(slic);
-        GetIndicesOfSlice(sly,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getNumberOfItemGivenBESRelative (wrap) : the input slice is invalid !");
+        GetIndicesOfSlice(slic,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getNumberOfItemGivenBESRelative (wrap) : the input slice is invalid !");
         return DataArray::GetNumberOfItemGivenBESRelative(strt,stp,step,"");
       }
 
@@ -649,18 +664,18 @@ namespace MEDCoupling
         if(sz!=2)
           throw INTERP_KERNEL::Exception("DataArrayDouble.__setstate__ : invalid tuple in input ! Should be of size 2 ! Invalid overwrite of __getstate__ ?");
         PyObject *a0(PyTuple_GetItem(inp,0));
-        if(!PyString_Check(a0))
-          throw INTERP_KERNEL::Exception(MSG);
+        self->setName(convertPyObjectToStr(a0,MSG));
         PyObject *a1(PyTuple_GetItem(inp,1));
         std::vector<std::string> a1cpp;
         if(!fillStringVector(a1,a1cpp))
           throw INTERP_KERNEL::Exception(MSG);
-        self->setName(PyString_AsString(a0));
         self->setInfoOnComponents(a1cpp);
       }
     }
   };
 
+  class DataArrayDouble;
+
   class DataArrayFloat : public DataArray
   {
   public:
@@ -671,6 +686,9 @@ namespace MEDCoupling
     bool isUniform(float val, float eps) const throw(INTERP_KERNEL::Exception);
     void pushBackSilent(float val) throw(INTERP_KERNEL::Exception);
     void iota(float init=0.) throw(INTERP_KERNEL::Exception);
+    DataArrayFloatIterator *iterator() throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayDouble> convertToDblArr() const throw(INTERP_KERNEL::Exception);
+    static DataArrayFloat *Meld(const DataArrayFloat *a1, const DataArrayFloat *a2) throw(INTERP_KERNEL::Exception);
     %extend
     {
       DataArrayFloat() throw(INTERP_KERNEL::Exception)
@@ -688,6 +706,11 @@ namespace MEDCoupling
         return MEDCoupling_DataArrayFloat_New__SWIG_1(elt0,nbOfTuples,elt2);
       }
 
+      DataArrayFloatIterator *__iter__() throw(INTERP_KERNEL::Exception)
+      {
+        return self->iterator();
+      }
+
       std::string __repr__() const throw(INTERP_KERNEL::Exception)
       {
         std::ostringstream oss;
@@ -725,6 +748,18 @@ namespace MEDCoupling
         return convertDblArrToPyListOfTuple<float>(vals,nbOfComp,nbOfTuples);
       }
 
+      PyObject *isEqualIfNotWhy(const DataArrayFloat& other, float prec) const throw(INTERP_KERNEL::Exception)
+      {
+        std::string ret1;
+        bool ret0=self->isEqualIfNotWhy(other,prec,ret1);
+        PyObject *ret=PyTuple_New(2);
+        PyObject *ret0Py=ret0?Py_True:Py_False;
+        Py_XINCREF(ret0Py);
+        PyTuple_SetItem(ret,0,ret0Py);
+        PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
+        return ret;
+      }
+      
       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
       {
         return DataArrayT__getitem<float>(self,obj);
@@ -735,13 +770,97 @@ namespace MEDCoupling
         return DataArrayT__setitem__<float>(self,obj,value);
       }
       
+      PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+      {
+        return DataArrayT_iadd<float>(trueSelf,obj,self);
+      }
+
+      PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+      {
+        return DataArrayT_isub<float>(trueSelf,obj,self);
+      }
+
+      PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+      {
+        return DataArrayT_imul<float>(trueSelf,obj,self);
+      }
+
+      DataArrayFloat *__rmul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+      {
+        return DataArrayFPT_rmul<float>(self,obj);
+      }
+
+      PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+      {
+        return DataArrayT_idiv<float>(trueSelf,obj,self);
+      }
+      
 #ifdef WITH_NUMPY
       PyObject *toNumPyArray() throw(INTERP_KERNEL::Exception) // not const. It is not a bug !
       {
         return ToNumPyArray<DataArrayFloat,float>(self,NPY_FLOAT,"DataArrayFloat");
       }
 #endif
-      
+    }
+  };
+
+  class DataArrayFloatTuple;
+
+  class DataArrayFloatIterator
+  {
+  public:
+    DataArrayFloatIterator(DataArrayFloat *da);
+    ~DataArrayFloatIterator();
+    %extend
+    {
+      PyObject *next()
+      {
+        DataArrayFloatTuple *ret=self->nextt();
+        if(ret)
+          return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayFloatTuple,SWIG_POINTER_OWN|0);
+        else
+          {
+            PyErr_SetString(PyExc_StopIteration,"No more data.");
+            return 0;
+          }
+      }
+    }
+  };
+
+  class DataArrayFloatTuple
+  {
+  public:
+    int getNumberOfCompo() const throw(INTERP_KERNEL::Exception);
+    DataArrayFloat *buildDAFloat(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
+    %extend
+    {
+      std::string __str__() const throw(INTERP_KERNEL::Exception)
+      {
+        return self->repr();
+      }
+
+      float __float__() const throw(INTERP_KERNEL::Exception)
+      {
+        return self->floatValue();
+      }
+
+      DataArrayFloat *buildDAFloat() throw(INTERP_KERNEL::Exception)
+      {
+        return self->buildDAFloat(1,self->getNumberOfCompo());
+      }
+  
+      /*PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
+      {
+        MCAuto<DataArrayFloat> ret=self->buildDAFloat(1,self->getNumberOfCompo());
+        MEDCoupling_DataArrayFloat____imul___(ret,0,obj);
+        Py_XINCREF(trueSelf);
+        return trueSelf;
+        }*/
+
+      PyObject *__len__() throw(INTERP_KERNEL::Exception)
+      {
+        return PyInt_FromLong(self->getNumberOfCompo());
+      }
     }
   };
   
@@ -798,9 +917,8 @@ namespace MEDCoupling
     void checkNoNullValues() const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *computeBBoxPerTuple(double epsilon=0.0) const throw(INTERP_KERNEL::Exception);
     void recenterForMaxPrecision(double eps) throw(INTERP_KERNEL::Exception);
-    double getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
     double getMaxValueInArray() const throw(INTERP_KERNEL::Exception);
-    double getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
+    double getMaxAbsValueInArray() const throw(INTERP_KERNEL::Exception);
     double getMinValueInArray() const throw(INTERP_KERNEL::Exception);
     int count(double value, double eps) const throw(INTERP_KERNEL::Exception);
     double getAverageValue() const throw(INTERP_KERNEL::Exception);
@@ -846,6 +964,7 @@ namespace MEDCoupling
     void applyFuncFast64(const std::string& func) throw(INTERP_KERNEL::Exception);
     DataArrayInt *findIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
     DataArrayInt *findIdsNotInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
+    DataArrayInt *findIdsStrictlyNegative() const throw(INTERP_KERNEL::Exception);
     static DataArrayDouble *Aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
     static DataArrayDouble *Meld(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
     static DataArrayDouble *Dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
@@ -862,6 +981,14 @@ namespace MEDCoupling
     void divideEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
     static DataArrayDouble *Pow(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
     void powEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> findIdsGreaterOrEqualTo(double val) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> findIdsGreaterThan(double val) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> findIdsLowerOrEqualTo(double val) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> findIdsLowerThan(double val) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> convertToIntArr() const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayDouble> selectPartDef(const PartDefinition* pd) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayDouble> cumSum() const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayFloat> convertToFloatArr() const throw(INTERP_KERNEL::Exception);
     %extend
     {
       DataArrayDouble() throw(INTERP_KERNEL::Exception)
@@ -879,30 +1006,6 @@ namespace MEDCoupling
         return MEDCoupling_DataArrayDouble_New__SWIG_1(elt0,nbOfTuples,elt2);
       }
 
-      DataArrayDouble *selectPartDef(const PartDefinition* pd) const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayDouble> ret(self->selectPartDef(pd));
-        return ret.retn();
-      }
-
-      DataArrayDouble *cumSum() const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayDouble> ret(self->cumSum());
-        return ret.retn();
-      }
-
-      DataArrayFloat *convertToFloatArr() const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayFloat> ret(self->convertToFloatArr());
-        return ret.retn();
-      }
-      
-      DataArrayInt *convertToIntArr() const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayInt> ret(self->convertToIntArr());
-        return ret.retn();
-      }
-
       void pushBackValsSilent(PyObject *li) throw(INTERP_KERNEL::Exception)
       {
         double val;
@@ -942,6 +1045,22 @@ namespace MEDCoupling
           }
       }
 
+      PyObject *asArcOfCircle() const throw(INTERP_KERNEL::Exception)
+      {
+        double center[2],radius,ang;
+        self->asArcOfCircle(center,radius,ang);
+        PyObject *ret(PyTuple_New(3));
+        {
+          PyObject *ret0(PyList_New(2));
+          PyList_SetItem(ret0,0,PyFloat_FromDouble(center[0]));
+          PyList_SetItem(ret0,1,PyFloat_FromDouble(center[1]));
+          PyTuple_SetItem(ret,0,ret0);
+        }
+        PyTuple_SetItem(ret,1,PyFloat_FromDouble(radius));
+        PyTuple_SetItem(ret,2,PyFloat_FromDouble(ang));        
+        return ret;
+      }
+
       DataArrayDoubleIterator *__iter__() throw(INTERP_KERNEL::Exception)
       {
         return self->iterator();
@@ -1174,6 +1293,16 @@ namespace MEDCoupling
         return ret;
       }
 
+         PyObject *getMaxAbsValue() const throw(INTERP_KERNEL::Exception)
+      {
+        std::size_t tmp;
+        double r1=self->getMaxAbsValue(tmp);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
+        PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
+        return ret;
+      }
+
       PyObject *getMaxValue2() const throw(INTERP_KERNEL::Exception)
       {
         DataArrayInt *tmp;
@@ -1225,7 +1354,7 @@ namespace MEDCoupling
       {
         int sw,sz,val;
         std::vector<int> val2;
-        const int *bg=convertObjToPossibleCpp1_Safe(indexArr,sw,sz,val,val2);
+        const int *bg=convertIntStarLikePyObjToCppIntStar(indexArr,sw,sz,val,val2);
         return self->accumulatePerChunck(bg,bg+sz);
       }
 
@@ -1367,7 +1496,7 @@ namespace MEDCoupling
           }
 #endif
         //
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1403,7 +1532,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1429,44 +1558,7 @@ namespace MEDCoupling
    
       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
       {
-        const char msg[]="Unexpected situation in __iadd__ !";
-        double val;
-        DataArrayDouble *a;
-        DataArrayDoubleTuple *aa;
-        std::vector<double> bb;
-        int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
-        switch(sw)
-          {
-          case 1:
-            {
-              self->applyLin(1.,val);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 2:
-            {
-              self->addEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
-              self->addEqual(aaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
-              self->addEqual(aaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
+        return DataArrayT_iadd<double>(trueSelf,obj,self);
       }
 
       PyObject *__sub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
@@ -1495,7 +1587,7 @@ namespace MEDCoupling
           }
 #endif
         //
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1531,7 +1623,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1557,44 +1649,7 @@ namespace MEDCoupling
 
       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
       {
-        const char msg[]="Unexpected situation in __isub__ !";
-        double val;
-        DataArrayDouble *a;
-        DataArrayDoubleTuple *aa;
-        std::vector<double> bb;
-        int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
-        switch(sw)
-          {
-          case 1:
-            {
-              self->applyLin(1,-val);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 2:
-            {
-              self->substractEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
-              self->substractEqual(aaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
-              self->substractEqual(aaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
+        return DataArrayT_isub<double>(trueSelf,obj,self);
       }
 
       PyObject *__mul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
@@ -1623,7 +1678,7 @@ namespace MEDCoupling
           }
 #endif
         //
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1653,76 +1708,12 @@ namespace MEDCoupling
 
       DataArrayDouble *__rmul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
       {
-        const char msg[]="Unexpected situation in __rmul__ !";
-        double val;
-        DataArrayDouble *a;
-        DataArrayDoubleTuple *aa;
-        std::vector<double> bb;
-        int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayDouble> ret=self->deepCopy();
-              ret->applyLin(val,0.);
-              return ret.retn();
-            }
-          case 3:
-            {
-              MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
-              return DataArrayDouble::Multiply(self,aaa);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
-              return DataArrayDouble::Multiply(self,aaa);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
+        return DataArrayFPT_rmul<double>(self,obj);
       }
 
       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
       {
-        const char msg[]="Unexpected situation in __imul__ !";
-        double val;
-        DataArrayDouble *a;
-        DataArrayDoubleTuple *aa;
-        std::vector<double> bb;
-        int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
-        switch(sw)
-          {
-          case 1:
-            {
-              self->applyLin(val,0.);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 2:
-            {
-              self->multiplyEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
-              self->multiplyEqual(aaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
-              self->multiplyEqual(aaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
+        return DataArrayT_imul<double>(trueSelf,obj,self);
       }
 
       PyObject *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
@@ -1751,7 +1742,7 @@ namespace MEDCoupling
           }
 #endif
         //
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1789,7 +1780,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1815,46 +1806,7 @@ namespace MEDCoupling
 
       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
       {
-        const char msg[]="Unexpected situation in __idiv__ !";
-        double val;
-        DataArrayDouble *a;
-        DataArrayDoubleTuple *aa;
-        std::vector<double> bb;
-        int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
-        switch(sw)
-          {
-          case 1:
-            {
-              if(val==0.)
-                throw INTERP_KERNEL::Exception("DataArrayDouble::__div__ : trying to divide by zero !");
-              self->applyLin(1./val,0.);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 2:
-            {
-              self->divideEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
-              self->divideEqual(aaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
-              self->divideEqual(aaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
+        return DataArrayT_idiv<double>(trueSelf,obj,self);
       }
    
       DataArrayDouble *__pow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
@@ -1865,7 +1817,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1901,7 +1853,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1933,7 +1885,7 @@ namespace MEDCoupling
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
         int sw;
-        convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
+        convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
           case 1:
@@ -1987,31 +1939,6 @@ namespace MEDCoupling
         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
-
-      // serialization
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"DataArrayDouble");
-      }
-
-      PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
-      {
-#ifdef WITH_NUMPY
-        if(!self->isAllocated())
-          throw INTERP_KERNEL::Exception("PyWrap of DataArrayDouble.__getnewargs__ : self is not allocated !");
-        PyObject *ret(PyTuple_New(1));
-        PyObject *ret0(PyDict_New());
-        PyObject *numpyArryObj(MEDCoupling_DataArrayDouble_toNumPyArray(self));
-        {// create a dict to discriminite in __new__ if __init__ should be called. Not beautiful but not idea ...
-          PyObject *tmp1(PyInt_FromLong(0));
-          PyDict_SetItem(ret0,tmp1,numpyArryObj); Py_DECREF(tmp1); Py_DECREF(numpyArryObj);
-          PyTuple_SetItem(ret,0,ret0);
-        }
-        return ret;
-#else
-        throw INTERP_KERNEL::Exception("PyWrap of DataArrayDouble.__getnewargs__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !");
-#endif
-      }
     }
   };
 
@@ -2107,7 +2034,7 @@ namespace MEDCoupling
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         const double *pt=self->getConstPointer();
         int nbc=self->getNumberOfCompo();
-        convertObjToPossibleCpp2WithNegIntInterp(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -2171,13 +2098,13 @@ namespace MEDCoupling
         std::vector<double> multiValV;
         MEDCoupling::DataArrayDoubleTuple *daIntTyyppV=0;
         int nbc=self->getNumberOfCompo();
-        convertObjToPossibleCpp44(value,sw1,singleValV,multiValV,daIntTyyppV);
+        convertDoubleStarLikePyObjToCpp(value,sw1,singleValV,multiValV,daIntTyyppV);
         int singleVal;
         std::vector<int> multiVal;
         std::pair<int, std::pair<int,int> > slic;
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         double *pt=self->getPointer();
-        convertObjToPossibleCpp2WithNegIntInterp(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
         switch(sw2)
           {
           case 1:
@@ -2354,6 +2281,7 @@ namespace MEDCoupling
     DataArrayInt *invertArrayO2N2N2O(int newNbOfElem) const throw(INTERP_KERNEL::Exception);
     DataArrayInt *invertArrayN2O2O2N(int oldNbOfElem) const throw(INTERP_KERNEL::Exception);
     DataArrayInt *invertArrayO2N2N2OBis(int newNbOfElem) const throw(INTERP_KERNEL::Exception);
+    MCAuto< MapII > invertArrayN2O2O2NOptimized() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *indicesOfSubPart(const DataArrayInt& partOfThis) const throw(INTERP_KERNEL::Exception);
     DataArrayInt *fromNoInterlace() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *toNoInterlace() const throw(INTERP_KERNEL::Exception);
@@ -2362,6 +2290,7 @@ namespace MEDCoupling
     DataArrayInt *buildPermArrPerLevel() const throw(INTERP_KERNEL::Exception);
     bool isIota(int sizeExpected) const throw(INTERP_KERNEL::Exception);
     bool isUniform(int val) const throw(INTERP_KERNEL::Exception);
+    int checkUniformAndGuess() const throw(INTERP_KERNEL::Exception);
     bool hasUniqueValues() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *subArray(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception);
     void transpose() throw(INTERP_KERNEL::Exception);
@@ -2394,9 +2323,8 @@ namespace MEDCoupling
     bool presenceOfValue(const std::vector<int>& vals) const throw(INTERP_KERNEL::Exception);
     int count(int value) const throw(INTERP_KERNEL::Exception);
     int accumulate(int compId) const throw(INTERP_KERNEL::Exception);
-    int getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
     int getMaxValueInArray() const throw(INTERP_KERNEL::Exception);
-    int getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
+    int getMaxAbsValueInArray() const throw(INTERP_KERNEL::Exception);
     int getMinValueInArray() const throw(INTERP_KERNEL::Exception);
     void abs() throw(INTERP_KERNEL::Exception);
     DataArrayInt *computeAbs() const throw(INTERP_KERNEL::Exception);
@@ -2411,7 +2339,7 @@ namespace MEDCoupling
     void applyRPow(int val) throw(INTERP_KERNEL::Exception);
     DataArrayInt *findIdsInRange(int vmin, int vmax) const throw(INTERP_KERNEL::Exception);
     DataArrayInt *findIdsNotInRange(int vmin, int vmax) const throw(INTERP_KERNEL::Exception);
-    DataArrayInt *findIdsStricltyNegative() const throw(INTERP_KERNEL::Exception);
+    DataArrayInt *findIdsStrictlyNegative() const throw(INTERP_KERNEL::Exception);
     bool checkAllIdsInRange(int vmin, int vmax) const throw(INTERP_KERNEL::Exception);
     static DataArrayInt *Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2) throw(INTERP_KERNEL::Exception);
     static DataArrayInt *Meld(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
@@ -2447,6 +2375,14 @@ namespace MEDCoupling
     void modulusEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
     static DataArrayInt *Pow(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
     void powEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> fromLinkedListOfPairToList() const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> findIdsGreaterOrEqualTo(int val) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> findIdsGreaterThan(int val) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> findIdsLowerOrEqualTo(int val) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> findIdsLowerThan(int val) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayInt> selectPartDef(const PartDefinition* pd) const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayDouble> convertToDblArr() const throw(INTERP_KERNEL::Exception);
+    MCAuto<DataArrayFloat> convertToFloatArr() const throw(INTERP_KERNEL::Exception);
   public:
     static DataArrayInt *Range(int begin, int end, int step) throw(INTERP_KERNEL::Exception);
     %extend
@@ -2556,18 +2492,6 @@ namespace MEDCoupling
           return MEDCoupling_DataArrayInt_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
         }
       
-      DataArrayDouble *convertToDblArr() const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayDouble> ret(self->convertToDblArr());
-        return ret.retn();
-      }
-      
-      DataArrayFloat *convertToFloatArr() const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayFloat> ret(self->convertToFloatArr());
-        return ret.retn();
-      }
-
       std::string __str__() const throw(INTERP_KERNEL::Exception)
       {
         return self->reprNotTooLong();
@@ -2594,42 +2518,6 @@ namespace MEDCoupling
       {
         return self->iterator();
       }
-
-      DataArrayInt *fromLinkedListOfPairToList() const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayInt> ret(self->fromLinkedListOfPairToList());
-        return ret.retn();
-      }
-      
-      DataArrayInt *findIdsGreaterOrEqualTo(int val) const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayInt> ret(self->findIdsGreaterOrEqualTo(val));
-        return ret.retn();
-      }
-      
-      DataArrayInt *findIdsGreaterThan(int val) const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayInt> ret(self->findIdsGreaterThan(val));
-        return ret.retn();
-      }
-      
-      DataArrayInt *findIdsLowerOrEqualTo(int val) const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayInt> ret(self->findIdsLowerOrEqualTo(val));
-        return ret.retn();
-      }
-      
-      DataArrayInt *findIdsLowerThan(int val) const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayInt> ret(self->findIdsLowerThan(val));
-        return ret.retn();
-      }
-
-      DataArrayInt *selectPartDef(const PartDefinition* pd) const throw(INTERP_KERNEL::Exception)
-      {
-        MCAuto<DataArrayInt> ret(self->selectPartDef(pd));
-        return ret.retn();
-      }
    
       PyObject *accumulate() const throw(INTERP_KERNEL::Exception)
       {
@@ -2643,7 +2531,7 @@ namespace MEDCoupling
       {
         int sw,sz,val;
         std::vector<int> val2;
-        const int *bg=convertObjToPossibleCpp1_Safe(indexArr,sw,sz,val,val2);
+        const int *bg=convertIntStarLikePyObjToCppIntStar(indexArr,sw,sz,val,val2);
         return self->accumulatePerChunck(bg,bg+sz);
       }
 
@@ -2651,10 +2539,19 @@ namespace MEDCoupling
       {
         int sw,sz,val;
         std::vector<int> val2;
-        const int *bg(convertObjToPossibleCpp1_Safe(inputTuple,sw,sz,val,val2));
+        const int *bg(convertIntStarLikePyObjToCppIntStar(inputTuple,sw,sz,val,val2));
         return self->findIdsEqualTuple(bg,bg+sz);
       }
 
+      DataArrayInt *findIdForEach(PyObject *vals) const throw(INTERP_KERNEL::Exception)
+      {
+        int sw,sz,val;
+        std::vector<int> val2;
+        const int *bg(convertIntStarLikePyObjToCppIntStar(vals,sw,sz,val,val2));
+        MCAuto<DataArrayInt> ret(self->findIdForEach(bg,bg+sz));
+        return ret.retn();
+      }
+
       PyObject *splitInBalancedSlices(int nbOfSlices) const throw(INTERP_KERNEL::Exception)
       {
         std::vector< std::pair<int,int> > slcs(self->splitInBalancedSlices(nbOfSlices));
@@ -2669,8 +2566,7 @@ namespace MEDCoupling
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
-        PySliceObject *sly=reinterpret_cast<PySliceObject *>(slic);
-        GetIndicesOfSliceExplicitely(sly,&strt,&stp,&step,"DataArrayInt::buildExplicitArrOfSliceOnScaledArr (wrap) : the input slice is invalid !");
+        GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArrayInt::buildExplicitArrOfSliceOnScaledArr (wrap) : the input slice is invalid !");
         if(strt==std::numeric_limits<int>::max() || stp==std::numeric_limits<int>::max())
           throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr (wrap) : the input slice contains some unknowns that can't be determined in static method ! Call DataArray::getSlice (non static) instead !");
         return self->buildExplicitArrOfSliceOnScaledArr(strt,stp,step);
@@ -2691,8 +2587,8 @@ namespace MEDCoupling
         int newNbOfTuples=-1;
         int szArr,szArrI,sw,iTypppArr,iTypppArrI;
         std::vector<int> stdvecTyyppArr,stdvecTyyppArrI;
-        const int *arrPtr=convertObjToPossibleCpp1_Safe(arr,sw,szArr,iTypppArr,stdvecTyyppArr);
-        const int *arrIPtr=convertObjToPossibleCpp1_Safe(arrI,sw,szArrI,iTypppArrI,stdvecTyyppArrI);
+        const int *arrPtr=convertIntStarLikePyObjToCppIntStar(arr,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *arrIPtr=convertIntStarLikePyObjToCppIntStar(arrI,sw,szArrI,iTypppArrI,stdvecTyyppArrI);
         DataArrayInt *ret0=MEDCoupling::DataArrayInt::ConvertIndexArrayToO2N(nbOfOldTuples,arrPtr,arrIPtr,arrIPtr+szArrI,newNbOfTuples);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj((void*)ret0,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
@@ -2705,7 +2601,7 @@ namespace MEDCoupling
         MCAuto<DataArrayInt> ret(DataArrayInt::New());
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *arrPtr(convertObjToPossibleCpp1_Safe(arr,sw,szArr,iTypppArr,stdvecTyyppArr));
+        const int *arrPtr(convertIntStarLikePyObjToCppIntStar(arr,sw,szArr,iTypppArr,stdvecTyyppArr));
         int *pt(MEDCoupling::DataArrayInt::CheckAndPreparePermutation(arrPtr,arrPtr+szArr));
         ret->useArray(pt,true,MEDCoupling::C_DEALLOC,szArr,1);
         return ret.retn();
@@ -2809,12 +2705,21 @@ namespace MEDCoupling
       void transformWithIndArr(PyObject *li) throw(INTERP_KERNEL::Exception)
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 ));
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            self->transformWithIndArr(tmp,tmp+size);
+            int res2(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__MapII, 0 |  0 ));
+            if(SWIG_IsOK(res2))
+              {
+                MapII *m=reinterpret_cast<MapII *>(da);
+                self->transformWithIndArr(*m);
+              }
+            else
+              {
+                int size;
+                INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+                self->transformWithIndArr(tmp,tmp+size);
+              }
           }
         else
           {
@@ -2830,7 +2735,7 @@ namespace MEDCoupling
         std::vector<int> multiVal;
         std::pair<int, std::pair<int,int> > slic;
         MEDCoupling::DataArrayInt *daIntTyypp=0;
-        convertObjToPossibleCpp2(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -2851,7 +2756,7 @@ namespace MEDCoupling
         std::vector<int> multiVal;
         std::pair<int, std::pair<int,int> > slic;
         MEDCoupling::DataArrayInt *daIntTyypp=0;
-        convertObjToPossibleCpp2(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCpp(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -3075,6 +2980,16 @@ namespace MEDCoupling
         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
         return ret;
       }
+    
+      PyObject *getMaxAbsValue(std::size_t& tupleId) const throw(INTERP_KERNEL::Exception)
+      {
+       std::size_t tmp;
+        int r1=self->getMaxAbsValue(tmp);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
+        PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
+        return ret;
+      }
 
       PyObject *getMinValue() const throw(INTERP_KERNEL::Exception)
       {
@@ -3256,7 +3171,7 @@ namespace MEDCoupling
         std::vector<int> v1;
         DataArrayInt *d1=0;
         DataArrayIntTuple *dd1=0;
-        convertObjToPossibleCpp1(value,sw1,i1,v1,d1,dd1);
+        convertIntStarLikePyObjToCpp(value,sw1,i1,v1,d1,dd1);
         int it1,ic1;
         std::vector<int> vt1,vc1;
         std::pair<int, std::pair<int,int> > pt1,pc1;
@@ -3668,7 +3583,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -3704,7 +3619,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -3736,7 +3651,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -3778,7 +3693,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -3814,7 +3729,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -3846,7 +3761,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -3888,7 +3803,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -3924,7 +3839,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -3956,7 +3871,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -3998,7 +3913,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -4034,7 +3949,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -4066,7 +3981,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -4108,7 +4023,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -4144,7 +4059,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -4180,7 +4095,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -4215,7 +4130,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -4251,7 +4166,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -4287,7 +4202,7 @@ namespace MEDCoupling
         std::vector<int> aa;
         DataArrayIntTuple *aaa;
         int sw;
-        convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
         switch(sw)
           {
           case 1:
@@ -4325,7 +4240,7 @@ namespace MEDCoupling
       {
         int szArr,sw,iTypppArr;
         std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->pushBackValsSilent(tmp,tmp+szArr);
       }
       
@@ -4375,31 +4290,6 @@ namespace MEDCoupling
         PyTuple_SetItem(pyRet,1,ret1Py);
         return pyRet;
       }
-      
-      // serialization
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"DataArrayInt");
-      }
-      
-      PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
-      {
-#ifdef WITH_NUMPY
-        if(!self->isAllocated())
-          throw INTERP_KERNEL::Exception("PyWrap of DataArrayInt.__getnewargs__ : self is not allocated !");
-        PyObject *ret(PyTuple_New(1));
-        PyObject *ret0(PyDict_New());
-        PyObject *numpyArryObj(MEDCoupling_DataArrayInt_toNumPyArray(self));
-        {// create a dict to discriminite in __new__ if __init__ should be called. Not beautiful but not idea ...
-          PyObject *tmp1(PyInt_FromLong(0));
-          PyDict_SetItem(ret0,tmp1,numpyArryObj); Py_DECREF(tmp1); Py_DECREF(numpyArryObj);
-          PyTuple_SetItem(ret,0,ret0);
-        }
-        return ret;
-#else
-        throw INTERP_KERNEL::Exception("PyWrap of DataArrayInt.__getnewargs__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !");
-#endif
-      }
     }
   };
 
@@ -4471,7 +4361,6 @@ namespace MEDCoupling
         Py_XINCREF(trueSelf);
         return trueSelf;
       }
-
       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
       {
         MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
@@ -4503,7 +4392,7 @@ namespace MEDCoupling
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         const int *pt=self->getConstPointer();
         int nbc=self->getNumberOfCompo();
-        convertObjToPossibleCpp2WithNegIntInterp(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -4574,7 +4463,7 @@ namespace MEDCoupling
         std::pair<int, std::pair<int,int> > slic;
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         int *pt=self->getPointer();
-        convertObjToPossibleCpp2WithNegIntInterp(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
         switch(sw2)
           {
           case 1:
@@ -5042,7 +4931,7 @@ namespace MEDCoupling
       {
         int sz=-1,sw=-1;
         int ival=-1; std::vector<int> ivval;
-        const int *pt=convertObjToPossibleCpp1_Safe(tupl,sw,sz,ival,ivval);
+        const int *pt=convertIntStarLikePyObjToCppIntStar(tupl,sw,sz,ival,ivval);
         std::vector<char> vals(sz);
         std::copy(pt,pt+sz,vals.begin());
         return self->presenceOfTuple(vals);
@@ -5052,7 +4941,7 @@ namespace MEDCoupling
       {
         int sz=-1,sw=-1;
         int ival=-1; std::vector<int> ivval;
-        const int *pt=convertObjToPossibleCpp1_Safe(vals,sw,sz,ival,ivval);
+        const int *pt=convertIntStarLikePyObjToCppIntStar(vals,sw,sz,ival,ivval);
         std::vector<char> vals2(sz);
         std::copy(pt,pt+sz,vals2.begin());
         return self->presenceOfValue(vals2);
@@ -5062,7 +4951,7 @@ namespace MEDCoupling
       {
         int sz=-1,sw=-1;
         int ival=-1; std::vector<int> ivval;
-        const int *pt=convertObjToPossibleCpp1_Safe(vals,sw,sz,ival,ivval);
+        const int *pt=convertIntStarLikePyObjToCppIntStar(vals,sw,sz,ival,ivval);
         std::vector<char> vals2(sz);
         std::copy(pt,pt+sz,vals2.begin());
         return self->findIdFirstEqual(vals2);
@@ -5072,7 +4961,7 @@ namespace MEDCoupling
       {
         int sz=-1,sw=-1;
         int ival=-1; std::vector<int> ivval;
-        const int *pt=convertObjToPossibleCpp1_Safe(tupl,sw,sz,ival,ivval);
+        const int *pt=convertIntStarLikePyObjToCppIntStar(tupl,sw,sz,ival,ivval);
         std::vector<char> vals(sz);
         std::copy(pt,pt+sz,vals.begin());
         return self->findIdFirstEqualTuple(vals);
@@ -5082,7 +4971,7 @@ namespace MEDCoupling
       {
         int sz=-1,sw=-1;
         int ival=-1; std::vector<int> ivval;
-        const int *pt=convertObjToPossibleCpp1_Safe(strOrListOfInt,sw,sz,ival,ivval);
+        const int *pt=convertIntStarLikePyObjToCppIntStar(strOrListOfInt,sw,sz,ival,ivval);
         std::vector<char> vals(sz);
         std::copy(pt,pt+sz,vals.begin());
         return self->findIdSequence(vals);
@@ -5167,31 +5056,6 @@ namespace MEDCoupling
       }
 #endif
 
-      // serialization
-      static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
-      {
-        return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"DataArrayByte");
-      }
-
-      PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
-      {
-#ifdef WITH_NUMPY
-        if(!self->isAllocated())
-          throw INTERP_KERNEL::Exception("PyWrap of DataArrayByte.__getnewargs__ : self is not allocated !");
-        PyObject *ret(PyTuple_New(1));
-        PyObject *ret0(PyDict_New());
-        PyObject *numpyArryObj(MEDCoupling_DataArrayByte_toNumPyArray(self));
-        {// create a dict to discriminite in __new__ if __init__ should be called. Not beautiful but not idea ...
-          PyObject *tmp1(PyInt_FromLong(0));
-          PyDict_SetItem(ret0,tmp1,numpyArryObj); Py_DECREF(tmp1); Py_DECREF(numpyArryObj);
-          PyTuple_SetItem(ret,0,ret0);
-        }
-        return ret;
-#else
-        throw INTERP_KERNEL::Exception("PyWrap of DataArrayByte.__getnewargs__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !");
-#endif
-      }
-
       DataArrayByte *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
       {
         self->checkAllocated();
@@ -5202,7 +5066,7 @@ namespace MEDCoupling
         std::vector<int> v1;
         DataArrayInt *d1=0;
         DataArrayIntTuple *dd1=0;
-        convertObjToPossibleCpp1(value,sw1,i1,v1,d1,dd1);
+        convertIntStarLikePyObjToCpp(value,sw1,i1,v1,d1,dd1);
         int it1,ic1;
         std::vector<int> vt1,vc1;
         std::pair<int, std::pair<int,int> > pt1,pc1;
@@ -5507,6 +5371,19 @@ namespace MEDCoupling
                     else
                       throw INTERP_KERNEL::Exception(msg);
                   }
+%#if PY_VERSION_HEX >= 0x03000000
+                else if(PyUnicode_Check(nbOfTuples))
+                  {
+                    if(PyUnicode_GET_LENGTH(nbOfTuples)!=1)
+                      throw INTERP_KERNEL::Exception(msg);
+                    //DataArrayAsciiChar.New(["abc","de","fghi"],"t")
+                    std::vector<std::string> tmp;
+                    if(fillStringVector(elt0,tmp))
+                      return DataArrayAsciiChar::New(tmp,PyUnicode_AsUTF8(nbOfTuples)[0]);
+                    else
+                      throw INTERP_KERNEL::Exception(msg);
+                  }
+%#endif
                 else
                   throw INTERP_KERNEL::Exception(msg);
               }
@@ -5615,6 +5492,15 @@ namespace MEDCoupling
             std::copy(PyString_AsString(tupl),PyString_AsString(tupl)+sz,vals.begin());
             return self->presenceOfTuple(vals);
           }
+%#if PY_VERSION_HEX >= 0x03000000
+        else if(PyUnicode_Check(tupl))
+          {
+            Py_ssize_t sz=PyUnicode_GET_LENGTH(tupl);
+            std::vector<char> vals(sz);
+            std::copy(PyUnicode_AsUTF8(tupl),PyUnicode_AsUTF8(tupl)+sz,vals.begin());
+            return self->presenceOfTuple(vals);
+          }
+%#endif
         else
           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::presenceOfTuple : only strings in input supported !");
       }
@@ -5628,6 +5514,15 @@ namespace MEDCoupling
             std::copy(PyString_AsString(vals),PyString_AsString(vals)+sz,vals2.begin());
             return self->presenceOfValue(vals2);
           }
+%#if PY_VERSION_HEX >= 0x03000000
+        if(PyUnicode_Check(vals))
+          {
+            Py_ssize_t sz=PyUnicode_GET_LENGTH(vals);
+            std::vector<char> vals2(sz);
+            std::copy(PyUnicode_AsUTF8(vals),PyUnicode_AsUTF8(vals)+sz,vals2.begin());
+            return self->presenceOfValue(vals2);
+          }
+%#endif
         else
           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::presenceOfValue : only strings in input supported !");
       }
@@ -5641,6 +5536,15 @@ namespace MEDCoupling
             std::copy(PyString_AsString(vals),PyString_AsString(vals)+sz,vals2.begin());
             return self->findIdFirstEqual(vals2);
           }
+%#if PY_VERSION_HEX >= 0x03000000
+        if(PyUnicode_Check(vals))
+          {
+            Py_ssize_t sz=PyUnicode_GET_LENGTH(vals);
+            std::vector<char> vals2(sz);
+            std::copy(PyUnicode_AsUTF8(vals),PyUnicode_AsUTF8(vals)+sz,vals2.begin());
+            return self->findIdFirstEqual(vals2);
+          }
+%#endif
         else
           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::findIdFirstEqual : only strings in input supported !");
       }
@@ -5654,6 +5558,15 @@ namespace MEDCoupling
             std::copy(PyString_AsString(tupl),PyString_AsString(tupl)+sz,vals.begin());
             return self->findIdFirstEqualTuple(vals);
           }
+%#if PY_VERSION_HEX >= 0x03000000
+        if(PyUnicode_Check(tupl))
+          {
+            Py_ssize_t sz=PyUnicode_GET_LENGTH(tupl);
+            std::vector<char> vals(sz);
+            std::copy(PyUnicode_AsUTF8(tupl),PyUnicode_AsUTF8(tupl)+sz,vals.begin());
+            return self->findIdFirstEqualTuple(vals);
+          }
+%#endif
         else
           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::findIdFirstEqualTuple : only strings in input supported !");
       }
@@ -5667,6 +5580,15 @@ namespace MEDCoupling
             std::copy(PyString_AsString(strOrListOfInt),PyString_AsString(strOrListOfInt)+sz,vals.begin());
             return self->findIdSequence(vals);
           }
+%#if PY_VERSION_HEX >= 0x03000000
+        else if(PyUnicode_Check(strOrListOfInt))
+          {
+            Py_ssize_t sz=PyUnicode_GET_LENGTH(strOrListOfInt);
+            std::vector<char> vals(sz);
+            std::copy(PyUnicode_AsUTF8(strOrListOfInt),PyUnicode_AsUTF8(strOrListOfInt)+sz,vals.begin());
+            return self->findIdSequence(vals);
+          }
+%#endif
         else
           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::search : only strings in input supported !");
       }
@@ -5717,6 +5639,17 @@ namespace MEDCoupling
                   else
                     throw INTERP_KERNEL::Exception("DataArrayAsciiChar::index : 'this' contains one component and trying to find a string with size different from 1 !");
                 }
+%#if PY_VERSION_HEX >= 0x03000000
+              if(PyUnicode_Check(obj))
+                {
+                  Py_ssize_t sz;
+                  char *pt=PyUnicode_AsUTF8AndSize(obj, &sz);
+                  if(sz==1)
+                    return self->findIdFirstEqual(pt[0]);
+                  else
+                    throw INTERP_KERNEL::Exception("DataArrayAsciiChar::index : 'this' contains one component and trying to find a string with size different from 1 !");
+                }
+%#endif
               else
                 throw INTERP_KERNEL::Exception("DataArrayAsciiChar::index : 'this' contains one component and trying to find an element which is not an integer !");
             }
@@ -5743,6 +5676,17 @@ namespace MEDCoupling
                   else
                     throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__contains__ : 'this' contains one component and trying to find a string with size different from 1 !");
                 }
+%#if PY_VERSION_HEX >= 0x03000000
+              if(PyUnicode_Check(obj))
+                {
+                  Py_ssize_t sz;
+                  char *pt=PyUnicode_AsUTF8AndSize(obj, &sz);
+                  if(sz==1)
+                    return self->presenceOfValue(pt[0]);
+                  else
+                    throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__contains__ : 'this' contains one component and trying to find a string with size different from 1 !");
+                }
+%#endif
               else
                 throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__contains__ : 'this' contains one component and trying to find an element which is not an integer !");
             }
@@ -5757,7 +5701,7 @@ namespace MEDCoupling
         std::vector<int> stdvecTyyppArr;
         std::pair<int, std::pair<int,int> > sTyyppArr;
         MEDCoupling::DataArrayInt *daIntTyypp=0;
-        convertObjToPossibleCpp2WithNegIntInterp(obj,self->getNumberOfTuples(),sw,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,self->getNumberOfTuples(),sw,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
         switch(sw)
           {
           case 1:
@@ -5782,7 +5726,7 @@ namespace MEDCoupling
         MEDCoupling::DataArrayInt *daIntTyypp=0;
         int nbOfCompo=self->getNumberOfComponents();
         int nbOfTuples=self->getNumberOfTuples();
-        convertObjToPossibleCpp2WithNegIntInterp(obj,nbOfTuples,sw1,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
+        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbOfTuples,sw1,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
         int sw2;
         char vc; std::string sc; std::vector<std::string> vsc; DataArrayChar *dacc=0;
         convertObjToPossibleCpp6(value,sw2,vc,sc,vsc,dacc);
@@ -5975,3 +5919,32 @@ namespace MEDCoupling
     }
   };
 }
+
+%pythoncode %{
+def MEDCouplingStdReduceFunct(cls,params):
+    a,b=params
+    ret=object.__new__(cls)
+    ret.__init__(*a)
+    ret.__setstate__(b)
+    return ret
+
+def MEDCouplingDataArrayDoubleReduce(self):
+    if not MEDCouplingHasNumPyBindings():
+      raise InterpKernelException("PyWrap of DataArrayDouble.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
+    return MEDCouplingStdReduceFunct,(DataArrayDouble,((self.toNumPyArray(),),(self.__getstate__()),))
+
+def MEDCouplingDataArrayIntReduce(self):
+    if not MEDCouplingHasNumPyBindings():
+      raise InterpKernelException("PyWrap of DataArrayInt.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
+    return MEDCouplingStdReduceFunct,(DataArrayInt,((self.toNumPyArray(),),(self.__getstate__()),))
+
+def MEDCouplingDataArrayByteReduce(self):
+    if not MEDCouplingHasNumPyBindings():
+      raise InterpKernelException("PyWrap of DataArrayByte.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
+    return MEDCouplingStdReduceFunct,(DataArrayByte,((self.toNumPyArray(),),(self.__getstate__()),))
+
+def MEDCouplingDataArrayFloatReduce(self):
+    if not MEDCouplingHasNumPyBindings():
+      raise InterpKernelException("PyWrap of DataArrayFloat.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
+    return MEDCouplingStdReduceFunct,(DataArrayFloat,((self.toNumPyArray(),),(self.__getstate__()),))
+%}