Salome HOME
- MEDLoader ReadField is now dealing int32, float64 and float32
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingMemArray.i
1 // Copyright (C) 2007-2016  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author : Anthony Geay (EDF R&D)
20
21 ////////////////////
22 %typemap(out) MEDCoupling::DataArray*
23 {
24   $result=convertDataArray($1,$owner);
25 }
26
27 %typemap(out) DataArray*
28 {
29   $result=convertDataArray($1,$owner);
30 }
31 //$$$$$$$$$$$$$$$$$$
32
33 ////////////////////
34 %typemap(out) MEDCoupling::DataArrayChar*
35 {
36   $result=convertDataArrayChar($1,$owner);
37 }
38
39 %typemap(out) DataArrayChar*
40 {
41   $result=convertDataArrayChar($1,$owner);
42 }
43
44 %typemap(out) MCAuto<MEDCoupling::DataArrayInt>
45 {
46   $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN|0);
47 }
48
49 %typemap(out) MCAuto<MEDCoupling::DataArrayDouble>
50 {
51   $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayDouble,SWIG_POINTER_OWN|0);
52 }
53
54 %typemap(out) MCAuto<MEDCoupling::DataArrayFloat>
55 {
56   $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayFloat,SWIG_POINTER_OWN|0);
57 }
58
59 %typemap(out) MCAuto<MEDCoupling::MapII>
60 {
61   $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__MapII,SWIG_POINTER_OWN|0);
62 }
63 //$$$$$$$$$$$$$$$$$$
64
65 %newobject MEDCoupling::DataArray::deepCopy;
66 %newobject MEDCoupling::DataArray::buildNewEmptyInstance;
67 %newobject MEDCoupling::DataArray::selectByTupleRanges;
68 %newobject MEDCoupling::DataArray::selectByTupleId;
69 %newobject MEDCoupling::DataArray::selectByTupleIdSafe;
70 %newobject MEDCoupling::DataArray::selectByTupleIdSafeSlice;
71 %newobject MEDCoupling::DataArray::Aggregate;
72 %newobject MEDCoupling::DataArrayFloat::New;
73 %newobject MEDCoupling::DataArrayFloat::iterator;
74 %newobject MEDCoupling::DataArrayFloat::__iter__;
75 %newobject MEDCoupling::DataArrayFloat::Meld;
76 %newobject MEDCoupling::DataArrayFloat::__rmul__;
77 %newobject MEDCoupling::DataArrayInt::New;
78 %newobject MEDCoupling::DataArrayInt::__iter__;
79 %newobject MEDCoupling::DataArrayInt::performCopyOrIncrRef;
80 %newobject MEDCoupling::DataArrayInt::subArray;
81 %newobject MEDCoupling::DataArrayInt::changeNbOfComponents;
82 %newobject MEDCoupling::DataArrayInt::accumulatePerChunck;
83 %newobject MEDCoupling::DataArrayInt::checkAndPreparePermutation;
84 %newobject MEDCoupling::DataArrayInt::transformWithIndArrR;
85 %newobject MEDCoupling::DataArrayInt::renumber;
86 %newobject MEDCoupling::DataArrayInt::renumberR;
87 %newobject MEDCoupling::DataArrayInt::renumberAndReduce;
88 %newobject MEDCoupling::DataArrayInt::invertArrayO2N2N2O;
89 %newobject MEDCoupling::DataArrayInt::invertArrayN2O2O2N;
90 %newobject MEDCoupling::DataArrayInt::invertArrayO2N2N2OBis;
91 %newobject MEDCoupling::DataArrayInt::findIdsEqual;
92 %newobject MEDCoupling::DataArrayInt::findIdsNotEqual;
93 %newobject MEDCoupling::DataArrayInt::findIdsEqualList;
94 %newobject MEDCoupling::DataArrayInt::findIdsNotEqualList;
95 %newobject MEDCoupling::DataArrayInt::findIdsEqualTuple;
96 %newobject MEDCoupling::DataArrayInt::findIdForEach;
97 %newobject MEDCoupling::DataArrayInt::sumPerTuple;
98 %newobject MEDCoupling::DataArrayInt::negate;
99 %newobject MEDCoupling::DataArrayInt::computeAbs;
100 %newobject MEDCoupling::DataArrayInt::findIdsInRange;
101 %newobject MEDCoupling::DataArrayInt::findIdsNotInRange;
102 %newobject MEDCoupling::DataArrayInt::findIdsStrictlyNegative;
103 %newobject MEDCoupling::DataArrayInt::Aggregate;
104 %newobject MEDCoupling::DataArrayInt::AggregateIndexes;
105 %newobject MEDCoupling::DataArrayInt::Meld;
106 %newobject MEDCoupling::DataArrayInt::Add;
107 %newobject MEDCoupling::DataArrayInt::Substract;
108 %newobject MEDCoupling::DataArrayInt::Multiply;
109 %newobject MEDCoupling::DataArrayInt::Divide;
110 %newobject MEDCoupling::DataArrayInt::Pow;
111 %newobject MEDCoupling::DataArrayInt::BuildUnion;
112 %newobject MEDCoupling::DataArrayInt::BuildIntersection;
113 %newobject MEDCoupling::DataArrayInt::Range;
114 %newobject MEDCoupling::DataArrayInt::indicesOfSubPart;
115 %newobject MEDCoupling::DataArrayInt::fromNoInterlace;
116 %newobject MEDCoupling::DataArrayInt::toNoInterlace;
117 %newobject MEDCoupling::DataArrayInt::buildComplement;
118 %newobject MEDCoupling::DataArrayInt::buildUnion;
119 %newobject MEDCoupling::DataArrayInt::buildSubstraction;
120 %newobject MEDCoupling::DataArrayInt::buildSubstractionOptimized;
121 %newobject MEDCoupling::DataArrayInt::buildIntersection;
122 %newobject MEDCoupling::DataArrayInt::buildUnique;
123 %newobject MEDCoupling::DataArrayInt::buildUniqueNotSorted;
124 %newobject MEDCoupling::DataArrayInt::deltaShiftIndex;
125 %newobject MEDCoupling::DataArrayInt::buildExplicitArrByRanges;
126 %newobject MEDCoupling::DataArrayInt::buildExplicitArrOfSliceOnScaledArr;
127 %newobject MEDCoupling::DataArrayInt::findRangeIdForEachTuple;
128 %newobject MEDCoupling::DataArrayInt::findIdInRangeForEachTuple;
129 %newobject MEDCoupling::DataArrayInt::duplicateEachTupleNTimes;
130 %newobject MEDCoupling::DataArrayInt::buildPermutationArr;
131 %newobject MEDCoupling::DataArrayInt::buildPermArrPerLevel;
132 %newobject MEDCoupling::DataArrayInt::getDifferentValues;
133 %newobject MEDCoupling::DataArrayInt::FindPermutationFromFirstToSecond;
134 %newobject MEDCoupling::DataArrayInt::CheckAndPreparePermutation;
135 %newobject MEDCoupling::DataArrayInt::__neg__;
136 %newobject MEDCoupling::DataArrayInt::__add__;
137 %newobject MEDCoupling::DataArrayInt::__radd__;
138 %newobject MEDCoupling::DataArrayInt::__sub__;
139 %newobject MEDCoupling::DataArrayInt::__rsub__;
140 %newobject MEDCoupling::DataArrayInt::__mul__;
141 %newobject MEDCoupling::DataArrayInt::__rmul__;
142 %newobject MEDCoupling::DataArrayInt::__div__;
143 %newobject MEDCoupling::DataArrayInt::__rdiv__;
144 %newobject MEDCoupling::DataArrayInt::__mod__;
145 %newobject MEDCoupling::DataArrayInt::__rmod__;
146 %newobject MEDCoupling::DataArrayInt::__pow__;
147 %newobject MEDCoupling::DataArrayInt::__rpow__;
148 %newobject MEDCoupling::DataArrayIntTuple::buildDAInt;
149 %newobject MEDCoupling::DataArrayChar::convertToIntArr;
150 %newobject MEDCoupling::DataArrayChar::renumber;
151 %newobject MEDCoupling::DataArrayChar::renumberR;
152 %newobject MEDCoupling::DataArrayChar::renumberAndReduce;
153 %newobject MEDCoupling::DataArrayChar::changeNbOfComponents;
154 %newobject MEDCoupling::DataArrayChar::findIdsEqual;
155 %newobject MEDCoupling::DataArrayChar::findIdsNotEqual;
156 %newobject MEDCoupling::DataArrayChar::Aggregate;
157 %newobject MEDCoupling::DataArrayChar::Meld;
158 %newobject MEDCoupling::DataArrayByte::New;
159 %newobject MEDCoupling::DataArrayByte::__iter__;
160 %newobject MEDCoupling::DataArrayByte::performCopyOrIncrRef;
161 %newobject MEDCoupling::DataArrayByteTuple::buildDAByte;
162 %newobject MEDCoupling::DataArrayChar::subArray;
163 %newobject MEDCoupling::DataArrayAsciiChar::New;
164 %newobject MEDCoupling::DataArrayAsciiChar::__iter__;
165 %newobject MEDCoupling::DataArrayAsciiChar::performCopyOrIncrRef;
166 %newobject MEDCoupling::DataArrayAsciiCharTuple::buildDAAsciiChar;
167 %newobject MEDCoupling::DataArrayDouble::New;
168 %newobject MEDCoupling::DataArrayDouble::__iter__;
169 %newobject MEDCoupling::DataArrayDouble::performCopyOrIncrRef;
170 %newobject MEDCoupling::DataArrayDouble::Aggregate;
171 %newobject MEDCoupling::DataArrayDouble::Meld;
172 %newobject MEDCoupling::DataArrayDouble::Dot;
173 %newobject MEDCoupling::DataArrayDouble::CrossProduct;
174 %newobject MEDCoupling::DataArrayDouble::Add;
175 %newobject MEDCoupling::DataArrayDouble::Substract;
176 %newobject MEDCoupling::DataArrayDouble::Multiply;
177 %newobject MEDCoupling::DataArrayDouble::Divide;
178 %newobject MEDCoupling::DataArrayDouble::Pow;
179 %newobject MEDCoupling::DataArrayDouble::symmetry3DPlane;
180 %newobject MEDCoupling::DataArrayDouble::subArray;
181 %newobject MEDCoupling::DataArrayDouble::changeNbOfComponents;
182 %newobject MEDCoupling::DataArrayDouble::accumulatePerChunck;
183 %newobject MEDCoupling::DataArrayDouble::findIdsInRange;
184 %newobject MEDCoupling::DataArrayDouble::findIdsNotInRange;
185 %newobject MEDCoupling::DataArrayDouble::findIdsStrictlyNegative;
186 %newobject MEDCoupling::DataArrayDouble::negate;
187 %newobject MEDCoupling::DataArrayDouble::computeAbs;
188 %newobject MEDCoupling::DataArrayDouble::applyFunc;
189 %newobject MEDCoupling::DataArrayDouble::applyFuncCompo;
190 %newobject MEDCoupling::DataArrayDouble::applyFuncNamedCompo;
191 %newobject MEDCoupling::DataArrayDouble::doublyContractedProduct;
192 %newobject MEDCoupling::DataArrayDouble::determinant;
193 %newobject MEDCoupling::DataArrayDouble::eigenValues;
194 %newobject MEDCoupling::DataArrayDouble::eigenVectors;
195 %newobject MEDCoupling::DataArrayDouble::inverse;
196 %newobject MEDCoupling::DataArrayDouble::trace;
197 %newobject MEDCoupling::DataArrayDouble::deviator;
198 %newobject MEDCoupling::DataArrayDouble::magnitude;
199 %newobject MEDCoupling::DataArrayDouble::maxPerTuple;
200 %newobject MEDCoupling::DataArrayDouble::sumPerTuple;
201 %newobject MEDCoupling::DataArrayDouble::computeBBoxPerTuple;
202 %newobject MEDCoupling::DataArrayDouble::buildEuclidianDistanceDenseMatrix;
203 %newobject MEDCoupling::DataArrayDouble::buildEuclidianDistanceDenseMatrixWith;
204 %newobject MEDCoupling::DataArrayDouble::renumber;
205 %newobject MEDCoupling::DataArrayDouble::renumberR;
206 %newobject MEDCoupling::DataArrayDouble::renumberAndReduce;
207 %newobject MEDCoupling::DataArrayDouble::fromNoInterlace;
208 %newobject MEDCoupling::DataArrayDouble::toNoInterlace;
209 %newobject MEDCoupling::DataArrayDouble::fromPolarToCart;
210 %newobject MEDCoupling::DataArrayDouble::fromCylToCart;
211 %newobject MEDCoupling::DataArrayDouble::fromSpherToCart;
212 %newobject MEDCoupling::DataArrayDouble::fromCartToPolar;
213 %newobject MEDCoupling::DataArrayDouble::fromCartToCyl;
214 %newobject MEDCoupling::DataArrayDouble::fromCartToSpher;
215 %newobject MEDCoupling::DataArrayDouble::fromCartToCylGiven;
216 %newobject MEDCoupling::DataArrayDouble::cartesianize;
217 %newobject MEDCoupling::DataArrayDouble::getDifferentValues;
218 %newobject MEDCoupling::DataArrayDouble::findClosestTupleId;
219 %newobject MEDCoupling::DataArrayDouble::computeNbOfInteractionsWith;
220 %newobject MEDCoupling::DataArrayDouble::duplicateEachTupleNTimes;
221 %newobject MEDCoupling::DataArrayDouble::__neg__;
222 %newobject MEDCoupling::DataArrayDouble::__radd__;
223 %newobject MEDCoupling::DataArrayDouble::__rsub__;
224 %newobject MEDCoupling::DataArrayDouble::__rmul__;
225 %newobject MEDCoupling::DataArrayDouble::__rdiv__;
226 %newobject MEDCoupling::DataArrayDouble::__pow__;
227 %newobject MEDCoupling::DataArrayDouble::__rpow__;
228 %newobject MEDCoupling::DataArrayDoubleTuple::buildDADouble;
229
230 %newobject MEDCoupling::PartDefinition::New;
231 %newobject MEDCoupling::PartDefinition::toDAI;
232 %newobject MEDCoupling::PartDefinition::__add__;
233 %newobject MEDCoupling::PartDefinition::composeWith;
234 %newobject MEDCoupling::PartDefinition::tryToSimplify;
235 %newobject MEDCoupling::DataArrayPartDefinition::New;
236 %newobject MEDCoupling::SlicePartDefinition::New;
237
238
239 %feature("unref") DataArray "$this->decrRef();"
240 %feature("unref") DataArrayDouble "$this->decrRef();"
241 %feature("unref") DataArrayInt "$this->decrRef();"
242 %feature("unref") DataArrayChar "$this->decrRef();"
243 %feature("unref") DataArrayAsciiChar "$this->decrRef();"
244 %feature("unref") DataArrayByte "$this->decrRef();"
245
246 %feature("unref") MapII "$this->decrRef();"
247 %feature("unref") PartDefinition "$this->decrRef();"
248 %feature("unref") DataArrayPartDefinition "$this->decrRef();"
249 %feature("unref") SlicePartDefinition "$this->decrRef();"
250
251 namespace MEDCoupling
252 {
253   typedef enum
254     {
255       AX_CART = 3,
256       AX_CYL = 4,
257       AX_SPHER = 5
258     } MEDCouplingAxisType;
259
260   class DataArrayInt;
261
262   class MapII : public RefCountObject, public TimeLabel
263   {
264   public:
265     static MCAuto< MapII > New();
266   };
267   
268   class PartDefinition : public RefCountObject, public TimeLabel
269   {
270   public:
271     static PartDefinition *New(int start, int stop, int step) throw(INTERP_KERNEL::Exception);
272     static PartDefinition *New(DataArrayInt *listOfIds) throw(INTERP_KERNEL::Exception);
273     virtual DataArrayInt *toDAI() const throw(INTERP_KERNEL::Exception);
274     virtual int getNumberOfElems() const throw(INTERP_KERNEL::Exception);
275     virtual std::string getRepr() const throw(INTERP_KERNEL::Exception);
276     virtual PartDefinition *composeWith(const PartDefinition *other) const throw(INTERP_KERNEL::Exception);
277     virtual void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
278     virtual PartDefinition *tryToSimplify() const throw(INTERP_KERNEL::Exception);
279     %extend
280     {
281       virtual PartDefinition *__add__(const PartDefinition& other) const throw(INTERP_KERNEL::Exception)
282       {
283         return (*self)+other;
284       }
285
286       virtual PyObject *isEqual(const PartDefinition *other) const throw(INTERP_KERNEL::Exception)
287       {
288         std::string ret1;
289         bool ret0(self->isEqual(other,ret1));
290         PyObject *ret=PyTuple_New(2);
291         PyObject *ret0Py=ret0?Py_True:Py_False;
292         Py_XINCREF(ret0Py);
293         PyTuple_SetItem(ret,0,ret0Py);
294         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
295         return ret;
296       }
297
298       virtual PyObject *deepCopy() const throw(INTERP_KERNEL::Exception)
299       {
300         return convertPartDefinition(self->deepCopy(),SWIG_POINTER_OWN | 0);
301       }
302     }
303   protected:
304     virtual ~PartDefinition();
305   };
306
307   class DataArrayPartDefinition : public PartDefinition
308   {
309   public:
310     static DataArrayPartDefinition *New(DataArrayInt *listOfIds) throw(INTERP_KERNEL::Exception);
311     %extend
312     {
313       DataArrayPartDefinition(DataArrayInt *listOfIds) throw(INTERP_KERNEL::Exception)
314       {
315         return DataArrayPartDefinition::New(listOfIds);
316       }
317
318       std::string __str__() const throw(INTERP_KERNEL::Exception)
319       {
320         return self->getRepr();
321       }
322       
323       std::string __repr__() const throw(INTERP_KERNEL::Exception)
324       {
325         std::ostringstream oss; oss << "DataArrayPartDefinition C++ instance at " << self << "." << std::endl;
326         oss << self->getRepr();
327         return oss.str();
328       }
329     }
330   protected:
331     virtual ~DataArrayPartDefinition();
332   };
333
334   class SlicePartDefinition : public PartDefinition
335   {
336   public:
337     static SlicePartDefinition *New(int start, int stop, int step) throw(INTERP_KERNEL::Exception);
338     int getEffectiveStop() const throw(INTERP_KERNEL::Exception);
339     %extend
340     {
341       SlicePartDefinition(int start, int stop, int step) throw(INTERP_KERNEL::Exception)
342       {
343         return SlicePartDefinition::New(start,stop,step);
344       }
345
346       PyObject *getSlice() const throw(INTERP_KERNEL::Exception)
347       {
348         int a,b,c;
349         self->getSlice(a,b,c);
350         return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(c));
351       }
352       
353       std::string __str__() const throw(INTERP_KERNEL::Exception)
354       {
355         return self->getRepr();
356       }
357       
358       std::string __repr__() const throw(INTERP_KERNEL::Exception)
359       {
360         std::ostringstream oss; oss << "SlicePartDefinition C++ instance at " << self << "." << std::endl;
361         oss << self->getRepr();
362         return oss.str();
363       }
364     }
365   protected:
366     virtual ~SlicePartDefinition();
367   };
368   
369   class DataArray : public RefCountObject, public TimeLabel
370   {
371   public:
372     void setName(const std::string& name);
373     void copyStringInfoFrom(const DataArray& other) throw(INTERP_KERNEL::Exception);
374     void copyPartOfStringInfoFrom(const DataArray& other, const std::vector<int>& compoIds) throw(INTERP_KERNEL::Exception);
375     void copyPartOfStringInfoFrom2(const std::vector<int>& compoIds, const DataArray& other) throw(INTERP_KERNEL::Exception);
376     bool areInfoEqualsIfNotWhy(const DataArray& other, std::string& reason) const throw(INTERP_KERNEL::Exception);
377     bool areInfoEquals(const DataArray& other) const throw(INTERP_KERNEL::Exception);
378     std::string cppRepr(const std::string& varName) const throw(INTERP_KERNEL::Exception);
379     std::string getName() const;
380     void setInfoOnComponents(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception);
381     void setInfoAndChangeNbOfCompo(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception);
382     std::vector<std::string> getVarsOnComponent() const throw(INTERP_KERNEL::Exception);
383     std::vector<std::string> getUnitsOnComponent() const throw(INTERP_KERNEL::Exception);
384     std::string getInfoOnComponent(int i) const throw(INTERP_KERNEL::Exception);
385     std::string getVarOnComponent(int i) const throw(INTERP_KERNEL::Exception);
386     std::string getUnitOnComponent(int i) const throw(INTERP_KERNEL::Exception);
387     void setInfoOnComponent(int i, const std::string& info) throw(INTERP_KERNEL::Exception);
388     int getNumberOfComponents() const;
389     virtual void alloc(int nbOfTuple, int nbOfCompo=1) throw(INTERP_KERNEL::Exception);
390     virtual void reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception);
391     virtual bool isAllocated() const throw(INTERP_KERNEL::Exception);
392     virtual void checkAllocated() const throw(INTERP_KERNEL::Exception);
393     virtual void desallocate() throw(INTERP_KERNEL::Exception);
394     virtual int getNumberOfTuples() const throw(INTERP_KERNEL::Exception);
395     virtual std::size_t getNbOfElems() const throw(INTERP_KERNEL::Exception);
396     virtual std::size_t getNbOfElemAllocated() const throw(INTERP_KERNEL::Exception);
397     virtual DataArray *deepCopy() const throw(INTERP_KERNEL::Exception);
398     virtual DataArray *buildNewEmptyInstance() const throw(INTERP_KERNEL::Exception);
399     virtual DataArray *selectByTupleIdSafeSlice(int bg, int end2, int step) const throw(INTERP_KERNEL::Exception);
400     virtual void rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception);
401     virtual void circularPermutation(int nbOfShift=1) throw(INTERP_KERNEL::Exception);
402     virtual void circularPermutationPerTuple(int nbOfShift=1) throw(INTERP_KERNEL::Exception);
403     virtual void reversePerTuple() throw(INTERP_KERNEL::Exception);
404     void checkNbOfTuples(int nbOfTuples, const std::string& msg) const throw(INTERP_KERNEL::Exception);
405     void checkNbOfComps(int nbOfCompo, const std::string& msg) const throw(INTERP_KERNEL::Exception);
406     void checkNbOfTuplesAndComp(const DataArray& other, const std::string& msg) const throw(INTERP_KERNEL::Exception);
407     void checkNbOfTuplesAndComp(int nbOfTuples, int nbOfCompo, const std::string& msg) const throw(INTERP_KERNEL::Exception);
408     void checkNbOfElems(std::size_t nbOfElems, const std::string& msg) const throw(INTERP_KERNEL::Exception);
409     static int GetNumberOfItemGivenBES(int begin, int end, int step, const std::string& msg) throw(INTERP_KERNEL::Exception);
410     static int GetNumberOfItemGivenBESRelative(int begin, int end, int step, const std::string& msg) throw(INTERP_KERNEL::Exception);
411     static int GetPosOfItemGivenBESRelativeNoThrow(int value, int begin, int end, int step) throw(INTERP_KERNEL::Exception);
412     static std::string GetVarNameFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception);
413     static std::string GetUnitFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception);
414     static std::string BuildInfoFromVarAndUnit(const std::string& var, const std::string& unit) throw(INTERP_KERNEL::Exception);
415     static std::string GetAxisTypeRepr(MEDCouplingAxisType at) throw(INTERP_KERNEL::Exception);
416     void updateTime() const;
417     %extend
418     {
419       PyObject *getInfoOnComponents() const throw(INTERP_KERNEL::Exception)
420       {
421         const std::vector<std::string>& comps=self->getInfoOnComponents();
422         PyObject *ret=PyList_New((int)comps.size());
423         for(int i=0;i<(int)comps.size();i++)
424           PyList_SetItem(ret,i,PyString_FromString(comps[i].c_str()));
425         return ret;
426       }
427       
428       void copyPartOfStringInfoFrom(const DataArray& other, PyObject *li) throw(INTERP_KERNEL::Exception)
429       {
430         std::vector<int> tmp;
431         convertPyToNewIntArr3(li,tmp);
432         self->copyPartOfStringInfoFrom(other,tmp);
433       }
434
435       void copyPartOfStringInfoFrom2(PyObject *li, const DataArray& other) throw(INTERP_KERNEL::Exception)
436       {
437         std::vector<int> tmp;
438         convertPyToNewIntArr3(li,tmp);
439         self->copyPartOfStringInfoFrom2(tmp,other);
440       }
441
442       virtual void renumberInPlace(PyObject *li) throw(INTERP_KERNEL::Exception)
443       {
444         void *da=0;
445         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
446         if (!SWIG_IsOK(res1))
447           {
448             int size;
449             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
450             if(size!=self->getNumberOfTuples())
451               {
452                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
453               }
454             self->renumberInPlace(tmp);
455           }
456         else
457           {
458             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
459             if(!da2)
460               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
461             da2->checkAllocated();
462             int size=self->getNumberOfTuples();
463             if(size!=self->getNumberOfTuples())
464               {
465                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
466               }
467             self->renumberInPlace(da2->getConstPointer());
468           }
469       }
470
471       virtual void renumberInPlaceR(PyObject *li) throw(INTERP_KERNEL::Exception)
472       {
473         void *da=0;
474         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
475         if (!SWIG_IsOK(res1))
476           {
477             int size;
478             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
479             if(size!=self->getNumberOfTuples())
480               {
481                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
482               }
483             self->renumberInPlaceR(tmp);
484           }
485         else
486           {
487             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
488             if(!da2)
489               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
490             da2->checkAllocated();
491             int size=self->getNumberOfTuples();
492             if(size!=self->getNumberOfTuples())
493               {
494                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
495               }
496             self->renumberInPlaceR(da2->getConstPointer());
497           }
498       }
499
500       //tuplesSelec in PyObject * because DataArrayInt is not already existing !
501       virtual void setContigPartOfSelectedValues(int tupleIdStart, PyObject *aBase, PyObject *tuplesSelec) throw(INTERP_KERNEL::Exception)
502       {
503         static const char msg[]="DataArray::setContigPartOfSelectedValuesSlice : 4th parameter \"tuplesSelec\" should be of type DataArrayInt";
504           DataArray *a=CheckAndRetrieveDataArrayInstance(aBase,"DataArray::setContigPartOfSelectedValuesSlice : 3rd parameter \"aBase\" should be of type DataArray");
505         DataArray *tuplesSelecPtr=CheckAndRetrieveDataArrayInstance(tuplesSelec,msg);
506         DataArrayInt *tuplesSelecPtr2=0;
507         if(tuplesSelecPtr)
508           {
509             tuplesSelecPtr2=dynamic_cast<DataArrayInt *>(tuplesSelecPtr);
510             if(!tuplesSelecPtr2)
511               throw INTERP_KERNEL::Exception(msg);
512           }
513         self->setContigPartOfSelectedValues(tupleIdStart,a,tuplesSelecPtr2);
514       }
515       
516       virtual void setContigPartOfSelectedValuesSlice(int tupleIdStart, PyObject *aBase, int bg, int end2, int step) throw(INTERP_KERNEL::Exception)
517       {
518         DataArray *a=CheckAndRetrieveDataArrayInstance(aBase,"DataArray::setContigPartOfSelectedValuesSlice : 2nd parameter \"aBase\" should be of type DataArray");
519         self->setContigPartOfSelectedValuesSlice(tupleIdStart,a,bg,end2,step);
520       }
521
522       virtual DataArray *selectByTupleRanges(PyObject *li) const throw(INTERP_KERNEL::Exception)
523       {
524         std::vector<std::pair<int,int> > ranges;
525         convertPyToVectorPairInt(li,ranges);
526         return self->selectByTupleRanges(ranges);
527       }
528
529       virtual DataArray *selectByTupleId(PyObject *li) const throw(INTERP_KERNEL::Exception)
530       {
531         void *da=0;
532         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
533         if (!SWIG_IsOK(res1))
534           {
535             int size;
536             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
537             return self->selectByTupleId(tmp,tmp+size);
538           }
539         else
540           {
541             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
542             if(!da2)
543               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
544             da2->checkAllocated();
545             return self->selectByTupleId(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
546           }
547       }
548
549       virtual DataArray *selectByTupleIdSafe(PyObject *li) const throw(INTERP_KERNEL::Exception)
550       {
551         void *da=0;
552         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
553         if (!SWIG_IsOK(res1))
554           {
555             int size;
556             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
557             return self->selectByTupleIdSafe(tmp,tmp+size);
558           }
559         else
560           {
561             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
562             if(!da2)
563               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
564             da2->checkAllocated();
565             return self->selectByTupleIdSafe(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
566           }
567       }
568
569       virtual PyObject *keepSelectedComponents(PyObject *li) const throw(INTERP_KERNEL::Exception)
570       {
571         std::vector<int> tmp;
572         convertPyToNewIntArr3(li,tmp);
573         DataArray *ret=self->keepSelectedComponents(tmp);
574         return convertDataArray(ret,SWIG_POINTER_OWN | 0 );
575       }
576
577       static PyObject *GetSlice(PyObject *slic, int sliceId, int nbOfSlices) throw(INTERP_KERNEL::Exception)
578       {
579         if(!PySlice_Check(slic))
580           throw INTERP_KERNEL::Exception("DataArray::GetSlice (wrap) : expecting a pyslice as second (first) parameter !");
581         Py_ssize_t strt=2,stp=2,step=2;
582         GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArray::GetSlice (wrap) : the input slice is invalid !");
583         int a,b;
584         DataArray::GetSlice(strt,stp,step,sliceId,nbOfSlices,a,b);
585         return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(step));
586       }
587
588       PyObject *getSlice(PyObject *slic, int sliceId, int nbOfSlices) const throw(INTERP_KERNEL::Exception)
589       {
590         if(!PySlice_Check(slic))
591           throw INTERP_KERNEL::Exception("DataArray::getSlice (wrap) : expecting a pyslice as second (first) parameter !");
592         Py_ssize_t strt=2,stp=2,step=2;
593         GetIndicesOfSlice(slic,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getSlice (wrap) : the input slice is invalid !");
594         int a,b;
595         DataArray::GetSlice(strt,stp,step,sliceId,nbOfSlices,a,b);
596         return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(step));
597       }
598
599       static int GetNumberOfItemGivenBES(PyObject *slic) throw(INTERP_KERNEL::Exception)
600       {
601         if(!PySlice_Check(slic))
602           throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBES (wrap) : expecting a pyslice as second (first) parameter !");
603         Py_ssize_t strt=2,stp=2,step=2;
604         GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArray::GetNumberOfItemGivenBES (wrap) : the input slice is invalid !");
605         return DataArray::GetNumberOfItemGivenBES(strt,stp,step,"");
606       }
607
608       static int GetNumberOfItemGivenBESRelative(PyObject *slic) throw(INTERP_KERNEL::Exception)
609       {
610         if(!PySlice_Check(slic))
611           throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBESRelative (wrap) : expecting a pyslice as second (first) parameter !");
612         Py_ssize_t strt=2,stp=2,step=2;
613         GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArray::GetNumberOfItemGivenBESRelative (wrap) : the input slice is invalid !");
614         return DataArray::GetNumberOfItemGivenBESRelative(strt,stp,step,"");
615       }
616       
617       static DataArray *Aggregate(PyObject *arrs) throw(INTERP_KERNEL::Exception)
618       {
619         std::vector<const DataArray *> tmp;
620         convertFromPyObjVectorOfObj<const MEDCoupling::DataArray *>(arrs,SWIGTYPE_p_MEDCoupling__DataArray,"DataArray",tmp);
621         return DataArray::Aggregate(tmp);
622       }
623
624       int getNumberOfItemGivenBES(PyObject *slic) const throw(INTERP_KERNEL::Exception)
625       {
626         if(!PySlice_Check(slic))
627           throw INTERP_KERNEL::Exception("DataArray::getNumberOfItemGivenBES (wrap) : expecting a pyslice as second (first) parameter !");
628         Py_ssize_t strt=2,stp=2,step=2;
629         GetIndicesOfSlice(slic,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getNumberOfItemGivenBES (wrap) : the input slice is invalid !");
630         return DataArray::GetNumberOfItemGivenBES(strt,stp,step,"");
631       }
632
633       int getNumberOfItemGivenBESRelative(PyObject *slic) throw(INTERP_KERNEL::Exception)
634       {
635         if(!PySlice_Check(slic))
636           throw INTERP_KERNEL::Exception("DataArray::getNumberOfItemGivenBESRelative (wrap) : expecting a pyslice as second (first) parameter !");
637         Py_ssize_t strt=2,stp=2,step=2;
638         GetIndicesOfSlice(slic,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getNumberOfItemGivenBESRelative (wrap) : the input slice is invalid !");
639         return DataArray::GetNumberOfItemGivenBESRelative(strt,stp,step,"");
640       }
641
642       PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
643       {
644         PyObject *ret(PyTuple_New(2));
645         std::string a0(self->getName());
646         const std::vector<std::string> &a1(self->getInfoOnComponents());
647         PyTuple_SetItem(ret,0,PyString_FromString(a0.c_str()));
648         //
649         int sz(a1.size());
650         PyObject *ret1(PyList_New(sz));
651         for(int i=0;i<sz;i++)
652           PyList_SetItem(ret1,i,PyString_FromString(a1[i].c_str()));
653         PyTuple_SetItem(ret,1,ret1);
654         //
655         return ret;
656       }
657
658       void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
659       {
660         static const char MSG[]="DataArrayDouble.__setstate__ : expected input is a tuple of size 2 with string as 1st arg and list of string as 2nd arg !";
661         if(!PyTuple_Check(inp))
662           throw INTERP_KERNEL::Exception("DataArrayDouble.__setstate__ : invalid input ! Invalid overwrite of __getstate__ ?");
663         int sz(PyTuple_Size(inp));
664         if(sz!=2)
665           throw INTERP_KERNEL::Exception("DataArrayDouble.__setstate__ : invalid tuple in input ! Should be of size 2 ! Invalid overwrite of __getstate__ ?");
666         PyObject *a0(PyTuple_GetItem(inp,0));
667         self->setName(convertPyObjectToStr(a0,MSG));
668         PyObject *a1(PyTuple_GetItem(inp,1));
669         std::vector<std::string> a1cpp;
670         if(!fillStringVector(a1,a1cpp))
671           throw INTERP_KERNEL::Exception(MSG);
672         self->setInfoOnComponents(a1cpp);
673       }
674     }
675   };
676
677   class DataArrayDouble;
678
679   class DataArrayFloat : public DataArray
680   {
681   public:
682     static DataArrayFloat *New();
683     void fillWithValue(float val) throw(INTERP_KERNEL::Exception);
684     bool isEqual(const DataArrayFloat& other, float prec) const throw(INTERP_KERNEL::Exception);
685     bool isEqualWithoutConsideringStr(const DataArrayFloat& other, float prec) const throw(INTERP_KERNEL::Exception);
686     bool isUniform(float val, float eps) const throw(INTERP_KERNEL::Exception);
687     void pushBackSilent(float val) throw(INTERP_KERNEL::Exception);
688     void iota(float init=0.) throw(INTERP_KERNEL::Exception);
689     DataArrayFloatIterator *iterator() throw(INTERP_KERNEL::Exception);
690     MCAuto<DataArrayDouble> convertToDblArr() const throw(INTERP_KERNEL::Exception);
691     static DataArrayFloat *Meld(const DataArrayFloat *a1, const DataArrayFloat *a2) throw(INTERP_KERNEL::Exception);
692     %extend
693     {
694       DataArrayFloat() throw(INTERP_KERNEL::Exception)
695       {
696         return DataArrayFloat::New();
697       }
698
699       static DataArrayFloat *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *elt2=0) throw(INTERP_KERNEL::Exception)
700       {
701         return DataArrayT_New<float>(elt0,nbOfTuples,elt2);
702       }
703    
704       DataArrayFloat(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *elt2=0) throw(INTERP_KERNEL::Exception)
705       {
706         return MEDCoupling_DataArrayFloat_New__SWIG_1(elt0,nbOfTuples,elt2);
707       }
708
709       DataArrayFloatIterator *__iter__() throw(INTERP_KERNEL::Exception)
710       {
711         return self->iterator();
712       }
713
714       std::string __repr__() const throw(INTERP_KERNEL::Exception)
715       {
716         std::ostringstream oss;
717         self->reprQuickOverview(oss);
718         return oss.str();
719       }
720
721       std::string __str__() const throw(INTERP_KERNEL::Exception)
722       {
723         return self->reprNotTooLong();
724       }
725
726       int __len__() const throw(INTERP_KERNEL::Exception)
727       {
728         if(self->isAllocated())
729           {
730             return self->getNumberOfTuples();
731           }
732         else
733           {
734             throw INTERP_KERNEL::Exception("DataArrayFloat::__len__ : Instance is NOT allocated !");
735           }
736       }
737
738       PyObject *getValues() const throw(INTERP_KERNEL::Exception)
739       {
740         const float *vals(self->begin());
741         return convertDblArrToPyList<float>(vals,self->getNbOfElems());
742       }
743
744       PyObject *getValuesAsTuple() const throw(INTERP_KERNEL::Exception)
745       {
746         const float *vals(self->begin());
747         int nbOfComp(self->getNumberOfComponents()),nbOfTuples(self->getNumberOfTuples());
748         return convertDblArrToPyListOfTuple<float>(vals,nbOfComp,nbOfTuples);
749       }
750
751       PyObject *isEqualIfNotWhy(const DataArrayFloat& other, float prec) const throw(INTERP_KERNEL::Exception)
752       {
753         std::string ret1;
754         bool ret0=self->isEqualIfNotWhy(other,prec,ret1);
755         PyObject *ret=PyTuple_New(2);
756         PyObject *ret0Py=ret0?Py_True:Py_False;
757         Py_XINCREF(ret0Py);
758         PyTuple_SetItem(ret,0,ret0Py);
759         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
760         return ret;
761       }
762       
763       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
764       {
765         return DataArrayT__getitem<float>(self,obj);
766       }
767
768       DataArrayFloat *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
769       {
770         return DataArrayT__setitem__<float>(self,obj,value);
771       }
772       
773       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
774       {
775         return DataArrayT_iadd<float>(trueSelf,obj,self);
776       }
777
778       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
779       {
780         return DataArrayT_isub<float>(trueSelf,obj,self);
781       }
782
783       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
784       {
785         return DataArrayT_imul<float>(trueSelf,obj,self);
786       }
787
788       DataArrayFloat *__rmul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
789       {
790         return DataArrayFPT_rmul<float>(self,obj);
791       }
792
793       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
794       {
795         return DataArrayT_idiv<float>(trueSelf,obj,self);
796       }
797       
798 #ifdef WITH_NUMPY
799       PyObject *toNumPyArray() throw(INTERP_KERNEL::Exception) // not const. It is not a bug !
800       {
801         return ToNumPyArray<DataArrayFloat,float>(self,NPY_FLOAT,"DataArrayFloat");
802       }
803 #endif
804     }
805   };
806
807   class DataArrayFloatTuple;
808
809   class DataArrayFloatIterator
810   {
811   public:
812     DataArrayFloatIterator(DataArrayFloat *da);
813     ~DataArrayFloatIterator();
814     %extend
815     {
816       PyObject *next()
817       {
818         DataArrayFloatTuple *ret=self->nextt();
819         if(ret)
820           return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayFloatTuple,SWIG_POINTER_OWN|0);
821         else
822           {
823             PyErr_SetString(PyExc_StopIteration,"No more data.");
824             return 0;
825           }
826       }
827     }
828   };
829
830   class DataArrayFloatTuple
831   {
832   public:
833     int getNumberOfCompo() const throw(INTERP_KERNEL::Exception);
834     DataArrayFloat *buildDAFloat(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
835     %extend
836     {
837       std::string __str__() const throw(INTERP_KERNEL::Exception)
838       {
839         return self->repr();
840       }
841
842       float __float__() const throw(INTERP_KERNEL::Exception)
843       {
844         return self->floatValue();
845       }
846
847       DataArrayFloat *buildDAFloat() throw(INTERP_KERNEL::Exception)
848       {
849         return self->buildDAFloat(1,self->getNumberOfCompo());
850       }
851   
852       /*PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
853       {
854         MCAuto<DataArrayFloat> ret=self->buildDAFloat(1,self->getNumberOfCompo());
855         MEDCoupling_DataArrayFloat____imul___(ret,0,obj);
856         Py_XINCREF(trueSelf);
857         return trueSelf;
858         }*/
859
860       PyObject *__len__() throw(INTERP_KERNEL::Exception)
861       {
862         return PyInt_FromLong(self->getNumberOfCompo());
863       }
864     }
865   };
866   
867   class DataArrayInt;
868   class DataArrayDoubleIterator;
869   
870   class DataArrayDouble : public DataArray
871   {
872   public:
873     static DataArrayDouble *New();
874     double doubleValue() const throw(INTERP_KERNEL::Exception);
875     bool empty() const throw(INTERP_KERNEL::Exception);
876     void aggregate(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
877     DataArrayDouble *performCopyOrIncrRef(bool deepCopy) const throw(INTERP_KERNEL::Exception);
878     void deepCopyFrom(const DataArrayDouble& other) throw(INTERP_KERNEL::Exception);
879     void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception);
880     void pushBackSilent(double val) throw(INTERP_KERNEL::Exception);
881     double popBackSilent() throw(INTERP_KERNEL::Exception);
882     void pack() const throw(INTERP_KERNEL::Exception);
883     void allocIfNecessary(int nbOfTuple, int nbOfCompo) throw(INTERP_KERNEL::Exception);
884     void fillWithZero() throw(INTERP_KERNEL::Exception);
885     void fillWithValue(double val) throw(INTERP_KERNEL::Exception);
886     void iota(double init=0.) throw(INTERP_KERNEL::Exception);
887     bool isUniform(double val, double eps) const throw(INTERP_KERNEL::Exception);
888     void sort(bool asc=true) throw(INTERP_KERNEL::Exception);
889     void reverse() throw(INTERP_KERNEL::Exception);
890     void checkMonotonic(bool increasing, double eps) const throw(INTERP_KERNEL::Exception);
891     bool isMonotonic(bool increasing, double eps) const throw(INTERP_KERNEL::Exception);
892     std::string repr() const throw(INTERP_KERNEL::Exception);
893     std::string reprZip() const throw(INTERP_KERNEL::Exception);
894     std::string reprNotTooLong() const throw(INTERP_KERNEL::Exception);
895     bool isEqual(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception);
896     bool isEqualWithoutConsideringStr(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception);
897     DataArrayDouble *fromNoInterlace() const throw(INTERP_KERNEL::Exception);
898     DataArrayDouble *toNoInterlace() const throw(INTERP_KERNEL::Exception);
899     DataArrayDouble *subArray(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception);
900     void transpose() throw(INTERP_KERNEL::Exception);
901     DataArrayDouble *changeNbOfComponents(int newNbOfComp, double dftValue) const throw(INTERP_KERNEL::Exception);
902     void meldWith(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
903     DataArrayDouble *duplicateEachTupleNTimes(int nbTimes) const throw(INTERP_KERNEL::Exception);
904     DataArrayDouble *getDifferentValues(double prec, int limitTupleId=-1) const throw(INTERP_KERNEL::Exception);
905     DataArrayInt *findClosestTupleId(const DataArrayDouble *other) const throw(INTERP_KERNEL::Exception);
906     DataArrayInt *computeNbOfInteractionsWith(const DataArrayDouble *otherBBoxFrmt, double eps) const throw(INTERP_KERNEL::Exception);
907     void setPartOfValues1(const DataArrayDouble *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true) throw(INTERP_KERNEL::Exception);
908     void setPartOfValuesSimple1(double a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp) throw(INTERP_KERNEL::Exception);
909     void setPartOfValuesAdv(const DataArrayDouble *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception);
910     double getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception);
911     double front() const throw(INTERP_KERNEL::Exception);
912     double back() const throw(INTERP_KERNEL::Exception);
913     double getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception);
914     void setIJ(int tupleId, int compoId, double newVal) throw(INTERP_KERNEL::Exception);
915     void setIJSilent(int tupleId, int compoId, double newVal) throw(INTERP_KERNEL::Exception);
916     double *getPointer() throw(INTERP_KERNEL::Exception);
917     void checkNoNullValues() const throw(INTERP_KERNEL::Exception);
918     DataArrayDouble *computeBBoxPerTuple(double epsilon=0.0) const throw(INTERP_KERNEL::Exception);
919     void recenterForMaxPrecision(double eps) throw(INTERP_KERNEL::Exception);
920     double getMaxValueInArray() const throw(INTERP_KERNEL::Exception);
921     double getMaxAbsValueInArray() const throw(INTERP_KERNEL::Exception);
922     double getMinValueInArray() const throw(INTERP_KERNEL::Exception);
923     int count(double value, double eps) const throw(INTERP_KERNEL::Exception);
924     double getAverageValue() const throw(INTERP_KERNEL::Exception);
925     double norm2() const throw(INTERP_KERNEL::Exception);
926     double normMax() const throw(INTERP_KERNEL::Exception);
927     double normMin() const throw(INTERP_KERNEL::Exception);
928     double accumulate(int compId) const throw(INTERP_KERNEL::Exception);
929     DataArrayDouble *fromPolarToCart() const throw(INTERP_KERNEL::Exception);
930     DataArrayDouble *fromCylToCart() const throw(INTERP_KERNEL::Exception);
931     DataArrayDouble *fromSpherToCart() const throw(INTERP_KERNEL::Exception);
932     DataArrayDouble *fromCartToPolar() const throw(INTERP_KERNEL::Exception);
933     DataArrayDouble *fromCartToCyl() const throw(INTERP_KERNEL::Exception);
934     DataArrayDouble *fromCartToSpher() const throw(INTERP_KERNEL::Exception);
935     DataArrayDouble *cartesianize(MEDCouplingAxisType atOfThis) const throw(INTERP_KERNEL::Exception);
936     DataArrayDouble *doublyContractedProduct() const throw(INTERP_KERNEL::Exception);
937     DataArrayDouble *determinant() const throw(INTERP_KERNEL::Exception);
938     DataArrayDouble *eigenValues() const throw(INTERP_KERNEL::Exception);
939     DataArrayDouble *eigenVectors() const throw(INTERP_KERNEL::Exception);
940     DataArrayDouble *inverse() const throw(INTERP_KERNEL::Exception);
941     DataArrayDouble *trace() const throw(INTERP_KERNEL::Exception);
942     DataArrayDouble *deviator() const throw(INTERP_KERNEL::Exception);
943     DataArrayDouble *magnitude() const throw(INTERP_KERNEL::Exception);
944     DataArrayDouble *maxPerTuple() const throw(INTERP_KERNEL::Exception);
945     DataArrayDouble *sumPerTuple() const throw(INTERP_KERNEL::Exception);
946     DataArrayDouble *buildEuclidianDistanceDenseMatrix() const throw(INTERP_KERNEL::Exception);
947     DataArrayDouble *buildEuclidianDistanceDenseMatrixWith(const DataArrayDouble *other) const throw(INTERP_KERNEL::Exception);
948     void sortPerTuple(bool asc) throw(INTERP_KERNEL::Exception);
949     void abs() throw(INTERP_KERNEL::Exception);
950     DataArrayDouble *computeAbs() const throw(INTERP_KERNEL::Exception);
951     void applyLin(double a, double b, int compoId) throw(INTERP_KERNEL::Exception);
952     void applyLin(double a, double b) throw(INTERP_KERNEL::Exception);
953     void applyInv(double numerator) throw(INTERP_KERNEL::Exception);
954     void applyPow(double val) throw(INTERP_KERNEL::Exception);
955     void applyRPow(double val) throw(INTERP_KERNEL::Exception);
956     DataArrayDouble *negate() const throw(INTERP_KERNEL::Exception);
957     DataArrayDouble *applyFunc(int nbOfComp, FunctionToEvaluate func) const throw(INTERP_KERNEL::Exception);
958     DataArrayDouble *applyFunc(int nbOfComp, const std::string& func, bool isSafe=true) const throw(INTERP_KERNEL::Exception);
959     DataArrayDouble *applyFunc(const std::string& func, bool isSafe=true) const throw(INTERP_KERNEL::Exception);
960     void applyFuncOnThis(const std::string& func, bool isSafe=true) throw(INTERP_KERNEL::Exception);
961     DataArrayDouble *applyFuncCompo(int nbOfComp, const std::string& func, bool isSafe=true) const throw(INTERP_KERNEL::Exception);
962     DataArrayDouble *applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func, bool isSafe=true) const throw(INTERP_KERNEL::Exception);
963     void applyFuncFast32(const std::string& func) throw(INTERP_KERNEL::Exception);
964     void applyFuncFast64(const std::string& func) throw(INTERP_KERNEL::Exception);
965     DataArrayInt *findIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
966     DataArrayInt *findIdsNotInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
967     DataArrayInt *findIdsStrictlyNegative() const throw(INTERP_KERNEL::Exception);
968     static DataArrayDouble *Aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
969     static DataArrayDouble *Meld(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
970     static DataArrayDouble *Dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
971     static DataArrayDouble *CrossProduct(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
972     static DataArrayDouble *Max(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
973     static DataArrayDouble *Min(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
974     static DataArrayDouble *Add(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
975     void addEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
976     static DataArrayDouble *Substract(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
977     void substractEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
978     static DataArrayDouble *Multiply(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
979     void multiplyEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
980     static DataArrayDouble *Divide(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
981     void divideEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
982     static DataArrayDouble *Pow(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
983     void powEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
984     MCAuto<DataArrayInt> findIdsGreaterOrEqualTo(double val) const throw(INTERP_KERNEL::Exception);
985     MCAuto<DataArrayInt> findIdsGreaterThan(double val) const throw(INTERP_KERNEL::Exception);
986     MCAuto<DataArrayInt> findIdsLowerOrEqualTo(double val) const throw(INTERP_KERNEL::Exception);
987     MCAuto<DataArrayInt> findIdsLowerThan(double val) const throw(INTERP_KERNEL::Exception);
988     MCAuto<DataArrayInt> convertToIntArr() const throw(INTERP_KERNEL::Exception);
989     MCAuto<DataArrayDouble> selectPartDef(const PartDefinition* pd) const throw(INTERP_KERNEL::Exception);
990     MCAuto<DataArrayDouble> cumSum() const throw(INTERP_KERNEL::Exception);
991     MCAuto<DataArrayFloat> convertToFloatArr() const throw(INTERP_KERNEL::Exception);
992     %extend
993     {
994       DataArrayDouble() throw(INTERP_KERNEL::Exception)
995       {
996         return DataArrayDouble::New();
997       }
998
999       static DataArrayDouble *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *elt2=0) throw(INTERP_KERNEL::Exception)
1000       {
1001         return DataArrayT_New<double>(elt0,nbOfTuples,elt2);
1002       }
1003    
1004       DataArrayDouble(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *elt2=0) throw(INTERP_KERNEL::Exception)
1005       {
1006         return MEDCoupling_DataArrayDouble_New__SWIG_1(elt0,nbOfTuples,elt2);
1007       }
1008
1009       void pushBackValsSilent(PyObject *li) throw(INTERP_KERNEL::Exception)
1010       {
1011         double val;
1012         std::vector<double> bb;
1013         int sw,nbTuples=-1;
1014         const char msg[]="Python wrap of DataArrayDouble::pushBackValsSilent : ";
1015         const double *tmp=convertObjToPossibleCpp5_SingleCompo(li,sw,val,bb,msg,true,nbTuples);
1016         self->pushBackValsSilent(tmp,tmp+nbTuples);
1017       }
1018
1019       std::string __repr__() const throw(INTERP_KERNEL::Exception)
1020       {
1021         std::ostringstream oss;
1022         self->reprQuickOverview(oss);
1023         return oss.str();
1024       }
1025
1026       std::string __str__() const throw(INTERP_KERNEL::Exception)
1027       {
1028         return self->reprNotTooLong();
1029       }
1030
1031       double __float__() const throw(INTERP_KERNEL::Exception)
1032       {
1033         return self->doubleValue();
1034       }
1035
1036       int __len__() const throw(INTERP_KERNEL::Exception)
1037       {
1038         if(self->isAllocated())
1039           {
1040             return self->getNumberOfTuples();
1041           }
1042         else
1043           {
1044             throw INTERP_KERNEL::Exception("DataArrayDouble::__len__ : Instance is NOT allocated !");
1045           }
1046       }
1047
1048       PyObject *asArcOfCircle() const throw(INTERP_KERNEL::Exception)
1049       {
1050         double center[2],radius,ang;
1051         self->asArcOfCircle(center,radius,ang);
1052         PyObject *ret(PyTuple_New(3));
1053         {
1054           PyObject *ret0(PyList_New(2));
1055           PyList_SetItem(ret0,0,PyFloat_FromDouble(center[0]));
1056           PyList_SetItem(ret0,1,PyFloat_FromDouble(center[1]));
1057           PyTuple_SetItem(ret,0,ret0);
1058         }
1059         PyTuple_SetItem(ret,1,PyFloat_FromDouble(radius));
1060         PyTuple_SetItem(ret,2,PyFloat_FromDouble(ang));        
1061         return ret;
1062       }
1063
1064       DataArrayDoubleIterator *__iter__() throw(INTERP_KERNEL::Exception)
1065       {
1066         return self->iterator();
1067       }
1068    
1069       void setValues(PyObject *li, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
1070       {
1071         const char *msg="MEDCoupling::DataArrayDouble::setValues : Available API are : \n-DataArrayDouble.setValues([1.,3.,4.])\n-DataArrayDouble.setValues([1.,3.,4.],3)\n-DataArrayDouble.setValues([1.,3.,4.,5.],2,2)\n-DataArrayDouble.setValues([(1.,1.7),(3.,3.7),(4.,4.7)])\n !";
1072         if(PyList_Check(li) || PyTuple_Check(li))
1073           {
1074             if(nbOfTuples)
1075               {
1076                 if(PyInt_Check(nbOfTuples))
1077                   {
1078                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
1079                     if(nbOfTuples1<0)
1080                       throw INTERP_KERNEL::Exception("DataArrayDouble::setValues : should be a positive set of allocated memory !");
1081                     if(nbOfComp)
1082                       {
1083                         if(PyInt_Check(nbOfComp))
1084                           {//DataArrayDouble.setValues([1.,3.,4.,5.],2,2)
1085                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
1086                             if(nbOfCompo<0)
1087                               throw INTERP_KERNEL::Exception("DataArrayDouble::setValues : should be a positive number of components !");
1088                             std::vector<double> tmp=fillArrayWithPyListDbl2(li,nbOfTuples1,nbOfCompo);
1089                             self->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),self->getPointer());
1090                           }
1091                         else
1092                           throw INTERP_KERNEL::Exception(msg);
1093                       }
1094                     else
1095                       {//DataArrayDouble.setValues([1.,3.,4.],3)
1096                         int tmpp1=-1;
1097                         std::vector<double> tmp=fillArrayWithPyListDbl2(li,nbOfTuples1,tmpp1);
1098                         self->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),self->getPointer());
1099                       }
1100                   }
1101                 else
1102                   throw INTERP_KERNEL::Exception(msg);
1103               }
1104             else
1105               {// DataArrayDouble.setValues([1.,3.,4.])
1106                 int tmpp1=-1,tmpp2=-1;
1107                 std::vector<double> tmp=fillArrayWithPyListDbl2(li,tmpp1,tmpp2);
1108                 self->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),self->getPointer());
1109               }
1110           }
1111         else
1112           throw INTERP_KERNEL::Exception(msg);
1113       }
1114
1115       PyObject *getValues() const throw(INTERP_KERNEL::Exception)
1116       {
1117         const double *vals(self->begin());
1118         return convertDblArrToPyList<double>(vals,self->getNbOfElems());
1119       }
1120
1121 #ifdef WITH_NUMPY
1122       PyObject *toNumPyArray() throw(INTERP_KERNEL::Exception) // not const. It is not a bug !
1123       {
1124         return ToNumPyArray<DataArrayDouble,double>(self,NPY_DOUBLE,"DataArrayDouble");
1125       }
1126 #endif
1127
1128       PyObject *isEqualIfNotWhy(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception)
1129       {
1130         std::string ret1;
1131         bool ret0=self->isEqualIfNotWhy(other,prec,ret1);
1132         PyObject *ret=PyTuple_New(2);
1133         PyObject *ret0Py=ret0?Py_True:Py_False;
1134         Py_XINCREF(ret0Py);
1135         PyTuple_SetItem(ret,0,ret0Py);
1136         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
1137         return ret;
1138       }
1139
1140       PyObject *getValuesAsTuple() const throw(INTERP_KERNEL::Exception)
1141       {
1142         const double *vals(self->begin());
1143         int nbOfComp(self->getNumberOfComponents()),nbOfTuples(self->getNumberOfTuples());
1144         return convertDblArrToPyListOfTuple<double>(vals,nbOfComp,nbOfTuples);
1145       }
1146
1147       DataArrayDouble *symmetry3DPlane(PyObject *point, PyObject *normalVector) throw(INTERP_KERNEL::Exception)
1148       {
1149         const char msg[]="Python wrap of DataArrayDouble::symmetry3DPlane : ";
1150         double val,val2;
1151         DataArrayDouble *a,*a2;
1152         DataArrayDoubleTuple *aa,*aa2;
1153         std::vector<double> bb,bb2;
1154         int sw;
1155         const double *centerPtr(convertObjToPossibleCpp5_Safe(point,sw,val,a,aa,bb,msg,1,3,true));
1156         const double *vectorPtr(convertObjToPossibleCpp5_Safe(normalVector,sw,val2,a2,aa2,bb2,msg,1,3,true));
1157         MCAuto<DataArrayDouble> ret(self->symmetry3DPlane(centerPtr,vectorPtr));
1158         return ret.retn();
1159       }
1160
1161       static PyObject *GiveBaseForPlane(PyObject *normalVector) throw(INTERP_KERNEL::Exception)
1162       {
1163         const char msg[]="Python wrap of DataArrayDouble::GiveBaseForPlane : ";
1164         double val,val2;
1165         DataArrayDouble *a,*a2;
1166         DataArrayDoubleTuple *aa,*aa2;
1167         std::vector<double> bb,bb2;
1168         int sw;
1169         const double *vectorPtr(convertObjToPossibleCpp5_Safe(normalVector,sw,val,a,aa,bb,msg,1,3,true));
1170         double res[9];
1171         DataArrayDouble::GiveBaseForPlane(vectorPtr,res);
1172         return convertDblArrToPyListOfTuple<double>(res,3,3);
1173       }
1174
1175       DataArrayDouble *fromCartToCylGiven(const DataArrayDouble *coords, PyObject *center, PyObject *vector) const
1176       {
1177         const char msg[]="Python wrap of DataArrayDouble::fromCartToCylGiven : ";
1178         double val,val2;
1179         DataArrayDouble *a,*a2;
1180         DataArrayDoubleTuple *aa,*aa2;
1181         std::vector<double> bb,bb2;
1182         int sw;
1183         const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,3,true);
1184         const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val2,a2,aa2,bb2,msg,1,3,true);
1185         return self->fromCartToCylGiven(coords,centerPtr,vectorPtr);
1186       }
1187       
1188       DataArrayDouble *renumber(PyObject *li) throw(INTERP_KERNEL::Exception)
1189       {
1190         void *da=0;
1191         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
1192         if (!SWIG_IsOK(res1))
1193           {
1194             int size;
1195             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
1196             if(size!=self->getNumberOfTuples())
1197               {
1198                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
1199               }
1200             return self->renumber(tmp);
1201           }
1202         else
1203           {
1204             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
1205             if(!da2)
1206               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
1207             da2->checkAllocated();
1208             int size=self->getNumberOfTuples();
1209             if(size!=self->getNumberOfTuples())
1210               {
1211                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
1212               }
1213             return self->renumber(da2->getConstPointer());
1214           }
1215       }
1216
1217       DataArrayDouble *renumberR(PyObject *li) throw(INTERP_KERNEL::Exception)
1218       {
1219         void *da=0;
1220         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
1221         if (!SWIG_IsOK(res1))
1222           {
1223             int size;
1224             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
1225             if(size!=self->getNumberOfTuples())
1226               {
1227                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
1228               }
1229             return self->renumberR(tmp);
1230           }
1231         else
1232           {
1233             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
1234             if(!da2)
1235               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
1236             da2->checkAllocated();
1237             int size=self->getNumberOfTuples();
1238             if(size!=self->getNumberOfTuples())
1239               {
1240                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
1241               }
1242             return self->renumberR(da2->getConstPointer());
1243           }
1244       }
1245
1246       DataArrayDouble *renumberAndReduce(PyObject *li, int newNbOfTuple) throw(INTERP_KERNEL::Exception)
1247       {
1248         void *da=0;
1249         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
1250         if (!SWIG_IsOK(res1))
1251           {
1252             int size;
1253             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
1254             if(size!=self->getNumberOfTuples())
1255               {
1256                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
1257               }
1258             return self->renumberAndReduce(tmp,newNbOfTuple);
1259           }
1260         else
1261           {
1262             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
1263             if(!da2)
1264               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
1265             da2->checkAllocated();
1266             int size=self->getNumberOfTuples();
1267             if(size!=self->getNumberOfTuples())
1268               {
1269                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
1270               }
1271             return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
1272           }
1273       }
1274
1275       PyObject *minimalDistanceTo(const DataArrayDouble *other) const throw(INTERP_KERNEL::Exception)
1276       {
1277         int thisTupleId,otherTupleId;
1278         double r0=self->minimalDistanceTo(other,thisTupleId,otherTupleId);
1279         PyObject *ret=PyTuple_New(3);
1280         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r0));
1281         PyTuple_SetItem(ret,1,PyInt_FromLong(thisTupleId));
1282         PyTuple_SetItem(ret,2,PyInt_FromLong(otherTupleId));
1283         return ret;
1284       }
1285
1286       PyObject *getMaxValue() const throw(INTERP_KERNEL::Exception)
1287       {
1288         int tmp;
1289         double r1=self->getMaxValue(tmp);
1290         PyObject *ret=PyTuple_New(2);
1291         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
1292         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
1293         return ret;
1294       }
1295
1296           PyObject *getMaxAbsValue() const throw(INTERP_KERNEL::Exception)
1297       {
1298         std::size_t tmp;
1299         double r1=self->getMaxAbsValue(tmp);
1300         PyObject *ret=PyTuple_New(2);
1301         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
1302         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
1303         return ret;
1304       }
1305
1306       PyObject *getMaxValue2() const throw(INTERP_KERNEL::Exception)
1307       {
1308         DataArrayInt *tmp;
1309         double r1=self->getMaxValue2(tmp);
1310         PyObject *ret=PyTuple_New(2);
1311         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
1312         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1313         return ret;
1314       }
1315
1316       PyObject *getMinValue() const throw(INTERP_KERNEL::Exception)
1317       {
1318         int tmp;
1319         double r1=self->getMinValue(tmp);
1320         PyObject *ret=PyTuple_New(2);
1321         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
1322         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
1323         return ret;
1324       }
1325
1326       PyObject *getMinValue2() const throw(INTERP_KERNEL::Exception)
1327       {
1328         DataArrayInt *tmp;
1329         double r1=self->getMinValue2(tmp);
1330         PyObject *ret=PyTuple_New(2);
1331         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
1332         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1333         return ret;
1334       }
1335
1336       PyObject *getMinMaxPerComponent() const throw(INTERP_KERNEL::Exception)
1337       {
1338         int nbOfCompo(self->getNumberOfComponents());
1339         INTERP_KERNEL::AutoPtr<double> tmp(new double[2*nbOfCompo]);
1340         self->getMinMaxPerComponent(tmp);
1341         PyObject *ret=convertDblArrToPyListOfTuple<double>(tmp,2,nbOfCompo);
1342         return ret;
1343       }
1344       
1345       PyObject *normMaxPerComponent() const throw(INTERP_KERNEL::Exception)
1346       {
1347         int nbOfCompo(self->getNumberOfComponents());
1348         INTERP_KERNEL::AutoPtr<double> tmp(new double[nbOfCompo]);
1349         self->normMaxPerComponent(tmp);
1350         return convertDblArrToPyList<double>(tmp,nbOfCompo);
1351       }
1352
1353       PyObject *accumulate() const throw(INTERP_KERNEL::Exception)
1354       {
1355         int sz=self->getNumberOfComponents();
1356         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
1357         self->accumulate(tmp);
1358         return convertDblArrToPyList<double>(tmp,sz);
1359       }
1360
1361       DataArrayDouble *accumulatePerChunck(PyObject *indexArr) const throw(INTERP_KERNEL::Exception)
1362       {
1363         int sw,sz,val;
1364         std::vector<int> val2;
1365         const int *bg=convertIntStarLikePyObjToCppIntStar(indexArr,sw,sz,val,val2);
1366         return self->accumulatePerChunck(bg,bg+sz);
1367       }
1368
1369       PyObject *findCommonTuples(double prec, int limitNodeId=-1) const throw(INTERP_KERNEL::Exception)
1370       {
1371         DataArrayInt *comm, *commIndex;
1372         self->findCommonTuples(prec,limitNodeId,comm,commIndex);
1373         PyObject *res = PyList_New(2);
1374         PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(comm),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1375         PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(commIndex),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1376         return res;
1377       }
1378
1379       PyObject *distanceToTuple(PyObject *tuple) const throw(INTERP_KERNEL::Exception)
1380       {
1381         double val;
1382         DataArrayDouble *a;
1383         DataArrayDoubleTuple *aa;
1384         std::vector<double> bb;
1385         int sw;
1386         int tupleId=-1,nbOfCompo=self->getNumberOfComponents();
1387         const double *pt=convertObjToPossibleCpp5_Safe(tuple,sw,val,a,aa,bb,"Python wrap of DataArrayDouble::distanceToTuple",1,nbOfCompo,true);
1388         //
1389         double ret0=self->distanceToTuple(pt,pt+nbOfCompo,tupleId);
1390         PyObject *ret=PyTuple_New(2);
1391         PyTuple_SetItem(ret,0,PyFloat_FromDouble(ret0));
1392         PyTuple_SetItem(ret,1,PyInt_FromLong(tupleId));
1393         return ret;
1394       }
1395
1396       void setSelectedComponents(const DataArrayDouble *a, PyObject *li) throw(INTERP_KERNEL::Exception)
1397       {
1398         std::vector<int> tmp;
1399         convertPyToNewIntArr3(li,tmp);
1400         self->setSelectedComponents(a,tmp);
1401       }
1402
1403       PyObject *explodeComponents() const throw(INTERP_KERNEL::Exception)
1404       {
1405         std::vector< MCAuto<DataArrayDouble> > retCpp(self->explodeComponents());
1406         std::size_t sz(retCpp.size());
1407         PyObject *res(PyList_New(sz));
1408         for(std::size_t i=0;i<sz;i++)
1409           PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i].retn()),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
1410         return res;
1411       }
1412    
1413       PyObject *getTuple(int tupleId) throw(INTERP_KERNEL::Exception)
1414       {
1415         int sz=self->getNumberOfComponents();
1416         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
1417         self->getTuple(tupleId,tmp);
1418         return convertDblArrToPyList<double>(tmp,sz);
1419       }
1420
1421       static DataArrayDouble *Aggregate(PyObject *li) throw(INTERP_KERNEL::Exception)
1422       {
1423         std::vector<const DataArrayDouble *> tmp;
1424         convertFromPyObjVectorOfObj<const DataArrayDouble *>(li,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",tmp);
1425         return DataArrayDouble::Aggregate(tmp);
1426       }
1427
1428       static DataArrayDouble *Meld(PyObject *li) throw(INTERP_KERNEL::Exception)
1429       {
1430         std::vector<const DataArrayDouble *> tmp;
1431         convertFromPyObjVectorOfObj<const DataArrayDouble *>(li,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",tmp);
1432         return DataArrayDouble::Meld(tmp);
1433       }
1434
1435       PyObject *computeTupleIdsNearTuples(PyObject *pt, double eps) const throw(INTERP_KERNEL::Exception)
1436       {
1437         double val;
1438         DataArrayDouble *a;
1439         DataArrayDoubleTuple *aa;
1440         std::vector<double> bb;
1441         int sw;
1442         int nbComp=self->getNumberOfComponents(),nbTuples=-1;
1443         const char msg[]="Python wrap of DataArrayDouble::computeTupleIdsNearTuples : ";
1444         const double *pos=convertObjToPossibleCpp5_Safe2(pt,sw,val,a,aa,bb,msg,nbComp,true,nbTuples);
1445         MCAuto<DataArrayDouble> inpu=DataArrayDouble::New(); inpu->useArray(pos,false,CPP_DEALLOC,nbTuples,nbComp);
1446         DataArrayInt *c=0,*cI=0;
1447         self->computeTupleIdsNearTuples(inpu,eps,c,cI);
1448         PyObject *ret=PyTuple_New(2);
1449         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1450         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1451         return ret;
1452       }
1453
1454       PyObject *areIncludedInMe(const DataArrayDouble *other, double prec) const throw(INTERP_KERNEL::Exception)
1455       {
1456         DataArrayInt *ret1=0;
1457         bool ret0=self->areIncludedInMe(other,prec,ret1);
1458         PyObject *ret=PyTuple_New(2);
1459         PyObject *ret0Py=ret0?Py_True:Py_False;
1460         Py_XINCREF(ret0Py);
1461         PyTuple_SetItem(ret,0,ret0Py);
1462         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1463         return ret;
1464       }
1465
1466       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1467       {
1468         return DataArrayT__getitem<double>(self,obj);
1469       }
1470
1471       DataArrayDouble *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
1472       {
1473         return DataArrayT__setitem__<double>(self,obj,value);
1474       }
1475
1476       DataArrayDouble *__neg__() const throw(INTERP_KERNEL::Exception)
1477       {
1478         return self->negate();
1479       }
1480
1481       PyObject *__add__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1482       {
1483         const char msg[]="Unexpected situation in DataArrayDouble.__add__ !";
1484         double val;
1485         DataArrayDouble *a;
1486         DataArrayDoubleTuple *aa;
1487         std::vector<double> bb;
1488         int sw;
1489         //
1490 #ifndef WITHOUT_AUTOFIELD
1491         void *argp;
1492         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
1493           {
1494             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
1495             if(other)
1496               {
1497                 PyObject *tmp=SWIG_NewPointerObj(SWIG_as_voidptr(self),SWIGTYPE_p_MEDCoupling__DataArrayDouble, 0 | 0 );
1498                 MCAuto<MEDCouplingFieldDouble> ret=MEDCoupling_MEDCouplingFieldDouble___radd__Impl(other,tmp);
1499                 Py_XDECREF(tmp);
1500                 return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 );
1501               }
1502             else
1503               throw INTERP_KERNEL::Exception(msg);
1504           }
1505 #endif
1506         //
1507         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1508         switch(sw)
1509           {
1510           case 1:
1511             {
1512               MCAuto<DataArrayDouble> ret=self->deepCopy();
1513               ret->applyLin(1.,val);
1514               return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1515             }
1516           case 2:
1517             {
1518               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Add(self,a)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1519             }
1520           case 3:
1521             {
1522               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1523               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Add(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1524             }
1525           case 4:
1526             {
1527               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1528               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Add(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1529             }
1530           default:
1531             throw INTERP_KERNEL::Exception(msg);
1532           }
1533       }
1534
1535       DataArrayDouble *__radd__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1536       {
1537         const char msg[]="Unexpected situation in __radd__ !";
1538         double val;
1539         DataArrayDouble *a;
1540         DataArrayDoubleTuple *aa;
1541         std::vector<double> bb;
1542         int sw;
1543         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1544         switch(sw)
1545           {
1546           case 1:
1547             {
1548               MCAuto<DataArrayDouble> ret=self->deepCopy();
1549               ret->applyLin(1.,val);
1550               return ret.retn();
1551             }
1552           case 3:
1553             {
1554               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1555               return DataArrayDouble::Add(self,aaa);
1556             }
1557           case 4:
1558             {
1559               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1560               return DataArrayDouble::Add(self,aaa);
1561             }
1562           default:
1563             throw INTERP_KERNEL::Exception(msg);
1564           }
1565       }
1566    
1567       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1568       {
1569         return DataArrayT_iadd<double>(trueSelf,obj,self);
1570       }
1571
1572       PyObject *__sub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1573       {
1574         const char msg[]="Unexpected situation in __sub__ !";
1575         double val;
1576         DataArrayDouble *a;
1577         DataArrayDoubleTuple *aa;
1578         std::vector<double> bb;
1579         int sw;
1580         //
1581 #ifndef WITHOUT_AUTOFIELD
1582         void *argp;
1583         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
1584           {
1585             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
1586             if(other)
1587               {
1588                 PyObject *tmp=SWIG_NewPointerObj(SWIG_as_voidptr(self),SWIGTYPE_p_MEDCoupling__DataArrayDouble, 0 | 0 );
1589                 MCAuto<MEDCouplingFieldDouble> ret=MEDCoupling_MEDCouplingFieldDouble___rsub__Impl(other,tmp);
1590                 Py_XDECREF(tmp);
1591                 return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 );
1592               }
1593             else
1594               throw INTERP_KERNEL::Exception(msg);
1595           }
1596 #endif
1597         //
1598         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1599         switch(sw)
1600           {
1601           case 1:
1602             {
1603               MCAuto<DataArrayDouble> ret=self->deepCopy();
1604               ret->applyLin(1.,-val);
1605               return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1606             }
1607           case 2:
1608             {
1609               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Substract(self,a)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1610             }
1611           case 3:
1612             {
1613               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1614               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Substract(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1615             }
1616           case 4:
1617             {
1618               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1619               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Substract(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1620             }
1621           default:
1622             throw INTERP_KERNEL::Exception(msg);
1623           }
1624       }
1625
1626       DataArrayDouble *__rsub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1627       {
1628         const char msg[]="Unexpected situation in __rsub__ !";
1629         double val;
1630         DataArrayDouble *a;
1631         DataArrayDoubleTuple *aa;
1632         std::vector<double> bb;
1633         int sw;
1634         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1635         switch(sw)
1636           {
1637           case 1:
1638             {
1639               MCAuto<DataArrayDouble> ret=self->deepCopy();
1640               ret->applyLin(-1.,val);
1641               return ret.retn();
1642             }
1643           case 3:
1644             {
1645               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1646               return DataArrayDouble::Substract(aaa,self);
1647             }
1648           case 4:
1649             {
1650               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1651               return DataArrayDouble::Substract(aaa,self);
1652             }
1653           default:
1654             throw INTERP_KERNEL::Exception(msg);
1655           }
1656       }
1657
1658       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1659       {
1660         return DataArrayT_isub<double>(trueSelf,obj,self);
1661       }
1662
1663       PyObject *__mul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1664       {
1665         const char msg[]="Unexpected situation in __mul__ !";
1666         double val;
1667         DataArrayDouble *a;
1668         DataArrayDoubleTuple *aa;
1669         std::vector<double> bb;
1670         int sw;
1671         //
1672 #ifndef WITHOUT_AUTOFIELD
1673         void *argp;
1674         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
1675           {
1676             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
1677             if(other)
1678               {
1679                 PyObject *tmp=SWIG_NewPointerObj(SWIG_as_voidptr(self),SWIGTYPE_p_MEDCoupling__DataArrayDouble, 0 | 0 );
1680                 MCAuto<MEDCouplingFieldDouble> ret=MEDCoupling_MEDCouplingFieldDouble___rmul__Impl(other,tmp);
1681                 Py_XDECREF(tmp);
1682                 return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 );
1683               }
1684             else
1685               throw INTERP_KERNEL::Exception(msg);
1686           }
1687 #endif
1688         //
1689         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1690         switch(sw)
1691           {
1692           case 1:
1693             {
1694               MCAuto<DataArrayDouble> ret=self->deepCopy();
1695               ret->applyLin(val,0.);
1696               return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1697             }
1698           case 2:
1699             {
1700               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Multiply(self,a)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1701             }
1702           case 3:
1703             {
1704               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1705               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Multiply(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1706             }
1707           case 4:
1708             {
1709               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1710               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Multiply(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1711             }
1712           default:
1713             throw INTERP_KERNEL::Exception(msg);
1714           }
1715       }
1716
1717       DataArrayDouble *__rmul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1718       {
1719         return DataArrayFPT_rmul<double>(self,obj);
1720       }
1721
1722       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1723       {
1724         return DataArrayT_imul<double>(trueSelf,obj,self);
1725       }
1726
1727       PyObject *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1728       {
1729         const char msg[]="Unexpected situation in __div__ !";
1730         double val;
1731         DataArrayDouble *a;
1732         DataArrayDoubleTuple *aa;
1733         std::vector<double> bb;
1734         int sw;
1735         //
1736 #ifndef WITHOUT_AUTOFIELD
1737         void *argp;
1738         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
1739           {
1740             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
1741             if(other)
1742               {
1743                 PyObject *tmp=SWIG_NewPointerObj(SWIG_as_voidptr(self),SWIGTYPE_p_MEDCoupling__DataArrayDouble, 0 | 0 );
1744                 MCAuto<MEDCouplingFieldDouble> ret=MEDCoupling_MEDCouplingFieldDouble___rdiv__Impl(other,tmp);
1745                 Py_XDECREF(tmp);
1746                 return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 );
1747               }
1748             else
1749               throw INTERP_KERNEL::Exception(msg);
1750           }
1751 #endif
1752         //
1753         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1754         switch(sw)
1755           {
1756           case 1:
1757             {
1758               if(val==0.)
1759                 throw INTERP_KERNEL::Exception("DataArrayDouble::__div__ : trying to divide by zero !");
1760               MCAuto<DataArrayDouble> ret=self->deepCopy();
1761               ret->applyLin(1/val,0.);
1762               return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1763             }
1764           case 2:
1765             {
1766               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Divide(self,a)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1767             }
1768           case 3:
1769             {
1770               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1771               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Divide(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1772             }
1773           case 4:
1774             {
1775               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1776               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Divide(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1777             }
1778           default:
1779             throw INTERP_KERNEL::Exception(msg);
1780           }
1781       }
1782
1783       DataArrayDouble *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1784       {
1785         const char msg[]="Unexpected situation in __rdiv__ !";
1786         double val;
1787         DataArrayDouble *a;
1788         DataArrayDoubleTuple *aa;
1789         std::vector<double> bb;
1790         int sw;
1791         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1792         switch(sw)
1793           {
1794           case 1:
1795             {
1796               MCAuto<DataArrayDouble> ret=self->deepCopy();
1797               ret->applyInv(val);
1798               return ret.retn();
1799             }
1800           case 3:
1801             {
1802               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1803               return DataArrayDouble::Divide(aaa,self);
1804             }
1805           case 4:
1806             {
1807               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1808               return DataArrayDouble::Divide(aaa,self);
1809             }
1810           default:
1811             throw INTERP_KERNEL::Exception(msg);
1812           }
1813       }
1814
1815       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1816       {
1817         return DataArrayT_idiv<double>(trueSelf,obj,self);
1818       }
1819    
1820       DataArrayDouble *__pow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1821       {
1822         const char msg[]="Unexpected situation in __pow__ !";
1823         double val;
1824         DataArrayDouble *a;
1825         DataArrayDoubleTuple *aa;
1826         std::vector<double> bb;
1827         int sw;
1828         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1829         switch(sw)
1830           {
1831           case 1:
1832             {
1833               MCAuto<DataArrayDouble> ret=self->deepCopy();
1834               ret->applyPow(val);
1835               return ret.retn();
1836             }
1837           case 2:
1838             {
1839               return DataArrayDouble::Pow(self,a);
1840             }
1841           case 3:
1842             {
1843               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1844               return DataArrayDouble::Pow(self,aaa);
1845             }
1846           case 4:
1847             {
1848               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1849               return DataArrayDouble::Pow(self,aaa);
1850             }
1851           default:
1852             throw INTERP_KERNEL::Exception(msg);
1853           }
1854       }
1855
1856       DataArrayDouble *__rpow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1857       {
1858         const char msg[]="Unexpected situation in __rpow__ !";
1859         double val;
1860         DataArrayDouble *a;
1861         DataArrayDoubleTuple *aa;
1862         std::vector<double> bb;
1863         int sw;
1864         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1865         switch(sw)
1866           {
1867           case 1:
1868             {
1869               MCAuto<DataArrayDouble> ret=self->deepCopy();
1870               ret->applyRPow(val);
1871               return ret.retn();
1872             }
1873           case 3:
1874             {
1875               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1876               return DataArrayDouble::Pow(aaa,self);
1877             }
1878           case 4:
1879             {
1880               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1881               return DataArrayDouble::Pow(aaa,self);
1882             }
1883           default:
1884             throw INTERP_KERNEL::Exception(msg);
1885           }
1886       }
1887
1888       PyObject *___ipow___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1889       {
1890         const char msg[]="Unexpected situation in __ipow__ !";
1891         double val;
1892         DataArrayDouble *a;
1893         DataArrayDoubleTuple *aa;
1894         std::vector<double> bb;
1895         int sw;
1896         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
1897         switch(sw)
1898           {
1899           case 1:
1900             {
1901               self->applyPow(val);
1902               Py_XINCREF(trueSelf);
1903               return trueSelf;
1904             }
1905           case 2:
1906             {
1907               self->powEqual(a);
1908               Py_XINCREF(trueSelf);
1909               return trueSelf;
1910             }
1911           case 3:
1912             {
1913               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1914               self->powEqual(aaa);
1915               Py_XINCREF(trueSelf);
1916               return trueSelf;
1917             }
1918           case 4:
1919             {
1920               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1921               self->powEqual(aaa);
1922               Py_XINCREF(trueSelf);
1923               return trueSelf;
1924             }
1925           default:
1926             throw INTERP_KERNEL::Exception(msg);
1927           }
1928       }
1929    
1930       PyObject *computeTupleIdsNearTuples(const DataArrayDouble *other, double eps)
1931       {
1932         DataArrayInt *c=0,*cI=0;
1933         //
1934         self->computeTupleIdsNearTuples(other,eps,c,cI);
1935         PyObject *ret=PyTuple_New(2);
1936         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1937         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1938         return ret;
1939       }
1940
1941       PyObject *maxPerTupleWithCompoId() const throw(INTERP_KERNEL::Exception)
1942       {
1943         DataArrayInt *ret1=0;
1944         DataArrayDouble *ret0=self->maxPerTupleWithCompoId(ret1);
1945         PyObject *ret=PyTuple_New(2);
1946         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
1947         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1948         return ret;
1949       }
1950     }
1951   };
1952
1953   class DataArrayDoubleTuple;
1954
1955   class DataArrayDoubleIterator
1956   {
1957   public:
1958     DataArrayDoubleIterator(DataArrayDouble *da);
1959     ~DataArrayDoubleIterator();
1960     %extend
1961     {
1962       PyObject *next()
1963       {
1964         DataArrayDoubleTuple *ret=self->nextt();
1965         if(ret)
1966           return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayDoubleTuple,SWIG_POINTER_OWN|0);
1967         else
1968           {
1969             PyErr_SetString(PyExc_StopIteration,"No more data.");
1970             return 0;
1971           }
1972       }
1973     }
1974   };
1975
1976   class DataArrayDoubleTuple
1977   {
1978   public:
1979     int getNumberOfCompo() const throw(INTERP_KERNEL::Exception);
1980     DataArrayDouble *buildDADouble(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
1981     %extend
1982     {
1983       std::string __str__() const throw(INTERP_KERNEL::Exception)
1984       {
1985         return self->repr();
1986       }
1987
1988       double __float__() const throw(INTERP_KERNEL::Exception)
1989       {
1990         return self->doubleValue();
1991       }
1992
1993       DataArrayDouble *buildDADouble() throw(INTERP_KERNEL::Exception)
1994       {
1995         return self->buildDADouble(1,self->getNumberOfCompo());
1996       }
1997
1998       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1999       {
2000         MCAuto<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
2001         MEDCoupling_DataArrayDouble____iadd___(ret,0,obj);
2002         Py_XINCREF(trueSelf);
2003         return trueSelf;
2004       }
2005   
2006       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
2007       {
2008         MCAuto<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
2009         MEDCoupling_DataArrayDouble____isub___(ret,0,obj);
2010         Py_XINCREF(trueSelf);
2011         return trueSelf;
2012       }
2013   
2014       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
2015       {
2016         MCAuto<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
2017         MEDCoupling_DataArrayDouble____imul___(ret,0,obj);
2018         Py_XINCREF(trueSelf);
2019         return trueSelf;
2020       }
2021
2022       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
2023       {
2024         MCAuto<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
2025         MEDCoupling_DataArrayDouble____idiv___(ret,0,obj);
2026         Py_XINCREF(trueSelf);
2027         return trueSelf;
2028       }
2029
2030       PyObject *__len__() throw(INTERP_KERNEL::Exception)
2031       {
2032         return PyInt_FromLong(self->getNumberOfCompo());
2033       }
2034
2035       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
2036       {
2037         const char msg2[]="DataArrayDoubleTuple::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
2038         int sw;
2039         int singleVal;
2040         std::vector<int> multiVal;
2041         std::pair<int, std::pair<int,int> > slic;
2042         MEDCoupling::DataArrayInt *daIntTyypp=0;
2043         const double *pt=self->getConstPointer();
2044         int nbc=self->getNumberOfCompo();
2045         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
2046         switch(sw)
2047           {
2048           case 1:
2049             {
2050               if(singleVal>=nbc)
2051                 {
2052                   std::ostringstream oss;
2053                   oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
2054                   PyErr_SetString(PyExc_StopIteration,oss.str().c_str());
2055                   return 0;
2056                 }
2057               if(singleVal>=0)
2058                 return PyFloat_FromDouble(pt[singleVal]);
2059               else
2060                 {
2061                   if(nbc+singleVal>0)
2062                     return PyFloat_FromDouble(pt[nbc+singleVal]);
2063                   else
2064                     {
2065                       std::ostringstream oss;
2066                       oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
2067                       throw INTERP_KERNEL::Exception(oss.str().c_str());
2068                     }
2069                 }
2070             }
2071           case 2:
2072             {
2073               PyObject *t=PyTuple_New(multiVal.size());
2074               for(int j=0;j<(int)multiVal.size();j++)
2075                 {
2076                   int cid=multiVal[j];
2077                   if(cid>=nbc)
2078                     {
2079                       std::ostringstream oss;
2080                       oss << "Requesting for id #" << cid << " having only " << nbc << " components !";
2081                       throw INTERP_KERNEL::Exception(oss.str().c_str());
2082                     }
2083                   PyTuple_SetItem(t,j,PyFloat_FromDouble(pt[cid]));
2084                 }
2085               return t;
2086             }
2087           case 3:
2088             {
2089               int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
2090               PyObject *t=PyTuple_New(sz);
2091               for(int j=0;j<sz;j++)
2092                 PyTuple_SetItem(t,j,PyFloat_FromDouble(pt[slic.first+j*slic.second.second]));
2093               return t;
2094             }
2095           default:
2096             throw INTERP_KERNEL::Exception("DataArrayDoubleTuple::__getitem__ : unrecognized type entered !");
2097           }
2098       }
2099
2100       DataArrayDoubleTuple *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
2101       {
2102         const char msg[]="DataArrayDoubleTuple::__setitem__ : unrecognized type entered, int, slice, list<int>, tuple<int> !";
2103         const char msg2[]="DataArrayDoubleTuple::__setitem__ : Mismatch of slice values in 2nd parameter (components) !";
2104         int sw1,sw2;
2105         double singleValV;
2106         std::vector<double> multiValV;
2107         MEDCoupling::DataArrayDoubleTuple *daIntTyyppV=0;
2108         int nbc=self->getNumberOfCompo();
2109         convertDoubleStarLikePyObjToCpp(value,sw1,singleValV,multiValV,daIntTyyppV);
2110         int singleVal;
2111         std::vector<int> multiVal;
2112         std::pair<int, std::pair<int,int> > slic;
2113         MEDCoupling::DataArrayInt *daIntTyypp=0;
2114         double *pt=self->getPointer();
2115         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
2116         switch(sw2)
2117           {
2118           case 1:
2119             {
2120               if(singleVal>=nbc)
2121                 {
2122                   std::ostringstream oss;
2123                   oss << "Requesting for setting id # " << singleVal << " having only " << nbc << " components !";
2124                   throw INTERP_KERNEL::Exception(oss.str().c_str());
2125                 }
2126               switch(sw1)
2127                 {
2128                 case 1:
2129                   {
2130                     pt[singleVal]=singleValV;
2131                     return self;
2132                   }
2133                 case 2:
2134                   {
2135                     if(multiValV.size()!=1)
2136                       {
2137                         std::ostringstream oss;
2138                         oss << "Requesting for setting id # " << singleVal << " with a list or tuple with size != 1 ! ";
2139                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2140                       }
2141                     pt[singleVal]=multiValV[0];
2142                     return self;
2143                   }
2144                 case 3:
2145                   {
2146                     pt[singleVal]=daIntTyyppV->getConstPointer()[0];
2147                     return self;
2148                   }
2149                 default:
2150                   throw INTERP_KERNEL::Exception(msg);
2151                 }
2152             }
2153           case 2:
2154             {
2155               switch(sw1)
2156                 {
2157                 case 1:
2158                   {
2159                     for(std::vector<int>::const_iterator it=multiVal.begin();it!=multiVal.end();it++)
2160                       {
2161                         if(*it>=nbc)
2162                           {
2163                             std::ostringstream oss;
2164                             oss << "Requesting for setting id # " << *it << " having only " << nbc << " components !";
2165                             throw INTERP_KERNEL::Exception(oss.str().c_str());
2166                           }
2167                         pt[*it]=singleValV;
2168                       }
2169                     return self;
2170                   }
2171                 case 2:
2172                   {
2173                     if(multiVal.size()!=multiValV.size())
2174                       {
2175                         std::ostringstream oss;
2176                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << multiVal.size() << " !";
2177                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2178                       }
2179                     for(int i=0;i<(int)multiVal.size();i++)
2180                       {
2181                         int pos=multiVal[i];
2182                         if(pos>=nbc)
2183                           {
2184                             std::ostringstream oss;
2185                             oss << "Requesting for setting id # " << pos << " having only " << nbc << " components !";
2186                             throw INTERP_KERNEL::Exception(oss.str().c_str());
2187                           }
2188                         pt[multiVal[i]]=multiValV[i];
2189                       }
2190                     return self;
2191                   }
2192                 case 3:
2193                   {
2194                     const double *ptV=daIntTyyppV->getConstPointer();
2195                     if(nbc>daIntTyyppV->getNumberOfCompo())
2196                       {
2197                         std::ostringstream oss;
2198                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
2199                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2200                       }
2201                     std::copy(ptV,ptV+nbc,pt);
2202                     return self;
2203                   }
2204                 default:
2205                   throw INTERP_KERNEL::Exception(msg);
2206                 }
2207             }
2208           case 3:
2209             {
2210               int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
2211               switch(sw1)
2212                 {
2213                 case 1:
2214                   {
2215                     for(int j=0;j<sz;j++)
2216                       pt[slic.first+j*slic.second.second]=singleValV;
2217                     return self;
2218                   }
2219                 case 2:
2220                   {
2221                     if(sz!=(int)multiValV.size())
2222                       {
2223                         std::ostringstream oss;
2224                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << sz << " !";
2225                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2226                       }
2227                     for(int j=0;j<sz;j++)
2228                       pt[slic.first+j*slic.second.second]=multiValV[j];
2229                     return self;
2230                   }
2231                 case 3:
2232                   {
2233                     const double *ptV=daIntTyyppV->getConstPointer();
2234                     if(sz>daIntTyyppV->getNumberOfCompo())
2235                       {
2236                         std::ostringstream oss;
2237                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
2238                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2239                       }
2240                     for(int j=0;j<sz;j++)
2241                       pt[slic.first+j*slic.second.second]=ptV[j];
2242                     return self;
2243                   }
2244                 default:
2245                   throw INTERP_KERNEL::Exception(msg);
2246                 }
2247             }
2248           default:
2249             throw INTERP_KERNEL::Exception(msg);
2250           }
2251       }
2252     }
2253   };
2254
2255   class DataArrayIntIterator;
2256
2257   class DataArrayInt : public DataArray
2258   {
2259   public:
2260     static DataArrayInt *New();
2261     int intValue() const throw(INTERP_KERNEL::Exception);
2262     int getHashCode() const throw(INTERP_KERNEL::Exception);
2263     bool empty() const throw(INTERP_KERNEL::Exception);
2264     void aggregate(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2265     DataArrayInt *performCopyOrIncrRef(bool deepCopy) const throw(INTERP_KERNEL::Exception);
2266     void deepCopyFrom(const DataArrayInt& other) throw(INTERP_KERNEL::Exception);
2267     void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception);
2268     void pushBackSilent(int val) throw(INTERP_KERNEL::Exception);
2269     int popBackSilent() throw(INTERP_KERNEL::Exception);
2270     void pack() const throw(INTERP_KERNEL::Exception);
2271     void allocIfNecessary(int nbOfTuple, int nbOfCompo) throw(INTERP_KERNEL::Exception);
2272     bool isEqual(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception);
2273     bool isEqualWithoutConsideringStr(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception);
2274     bool isEqualWithoutConsideringStrAndOrder(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception);
2275     DataArrayInt *buildPermutationArr(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception);
2276     DataArrayInt *sumPerTuple() const throw(INTERP_KERNEL::Exception);
2277     void sort(bool asc=true) throw(INTERP_KERNEL::Exception);
2278     void reverse() throw(INTERP_KERNEL::Exception);
2279     void checkMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception);
2280     bool isMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception);
2281     void checkStrictlyMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception);
2282     bool isStrictlyMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception);
2283     void fillWithZero() throw(INTERP_KERNEL::Exception);
2284     void fillWithValue(int val) throw(INTERP_KERNEL::Exception);
2285     void iota(int init=0) throw(INTERP_KERNEL::Exception);
2286     std::string repr() const throw(INTERP_KERNEL::Exception);
2287     std::string reprZip() const throw(INTERP_KERNEL::Exception);
2288     std::string reprNotTooLong() const throw(INTERP_KERNEL::Exception);
2289     DataArrayInt *invertArrayO2N2N2O(int newNbOfElem) const throw(INTERP_KERNEL::Exception);
2290     DataArrayInt *invertArrayN2O2O2N(int oldNbOfElem) const throw(INTERP_KERNEL::Exception);
2291     DataArrayInt *invertArrayO2N2N2OBis(int newNbOfElem) const throw(INTERP_KERNEL::Exception);
2292     MCAuto< MapII > invertArrayN2O2O2NOptimized() const throw(INTERP_KERNEL::Exception);
2293     MCAuto< MapII > giveN2OOptimized() const throw(INTERP_KERNEL::Exception);
2294     DataArrayInt *indicesOfSubPart(const DataArrayInt& partOfThis) const throw(INTERP_KERNEL::Exception);
2295     DataArrayInt *fromNoInterlace() const throw(INTERP_KERNEL::Exception);
2296     DataArrayInt *toNoInterlace() const throw(INTERP_KERNEL::Exception);
2297     DataArrayInt *selectByTupleIdSafeSlice(int bg, int end, int step) const throw(INTERP_KERNEL::Exception);
2298     DataArrayInt *checkAndPreparePermutation() const throw(INTERP_KERNEL::Exception);
2299     DataArrayInt *buildPermArrPerLevel() const throw(INTERP_KERNEL::Exception);
2300     bool isIota(int sizeExpected) const throw(INTERP_KERNEL::Exception);
2301     bool isUniform(int val) const throw(INTERP_KERNEL::Exception);
2302     int checkUniformAndGuess() const throw(INTERP_KERNEL::Exception);
2303     bool hasUniqueValues() const throw(INTERP_KERNEL::Exception);
2304     DataArrayInt *subArray(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception);
2305     void transpose() throw(INTERP_KERNEL::Exception);
2306     DataArrayInt *changeNbOfComponents(int newNbOfComp, int dftValue) const throw(INTERP_KERNEL::Exception);
2307     void meldWith(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2308     void setPartOfValues1(const DataArrayInt *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true) throw(INTERP_KERNEL::Exception);
2309     void setPartOfValuesSimple1(int a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp) throw(INTERP_KERNEL::Exception);
2310     void setPartOfValuesAdv(const DataArrayInt *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception);
2311     void getTuple(int tupleId, int *res) const throw(INTERP_KERNEL::Exception);
2312     int getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception);
2313     int getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception);
2314     int front() const throw(INTERP_KERNEL::Exception);
2315     int back() const throw(INTERP_KERNEL::Exception);
2316     void setIJ(int tupleId, int compoId, int newVal) throw(INTERP_KERNEL::Exception);
2317     void setIJSilent(int tupleId, int compoId, int newVal) throw(INTERP_KERNEL::Exception);
2318     int *getPointer() throw(INTERP_KERNEL::Exception);
2319     const int *getConstPointer() const throw(INTERP_KERNEL::Exception);
2320     DataArrayIntIterator *iterator() throw(INTERP_KERNEL::Exception);
2321     const int *begin() const throw(INTERP_KERNEL::Exception);
2322     const int *end() const throw(INTERP_KERNEL::Exception);
2323     DataArrayInt *findIdsEqual(int val) const throw(INTERP_KERNEL::Exception);
2324     DataArrayInt *findIdsNotEqual(int val) const throw(INTERP_KERNEL::Exception);
2325     int changeValue(int oldValue, int newValue) throw(INTERP_KERNEL::Exception);
2326     int findIdFirstEqualTuple(const std::vector<int>& tupl) const throw(INTERP_KERNEL::Exception);
2327     int findIdFirstEqual(int value) const throw(INTERP_KERNEL::Exception);
2328     int findIdFirstEqual(const std::vector<int>& vals) const throw(INTERP_KERNEL::Exception);
2329     int findIdSequence(const std::vector<int>& vals) const throw(INTERP_KERNEL::Exception);
2330     bool presenceOfTuple(const std::vector<int>& tupl) const throw(INTERP_KERNEL::Exception);
2331     bool presenceOfValue(int value) const throw(INTERP_KERNEL::Exception);
2332     bool presenceOfValue(const std::vector<int>& vals) const throw(INTERP_KERNEL::Exception);
2333     int count(int value) const throw(INTERP_KERNEL::Exception);
2334     int accumulate(int compId) const throw(INTERP_KERNEL::Exception);
2335     int getMaxValueInArray() const throw(INTERP_KERNEL::Exception);
2336     int getMaxAbsValueInArray() const throw(INTERP_KERNEL::Exception);
2337     int getMinValueInArray() const throw(INTERP_KERNEL::Exception);
2338     void abs() throw(INTERP_KERNEL::Exception);
2339     DataArrayInt *computeAbs() const throw(INTERP_KERNEL::Exception);
2340     void applyLin(int a, int b, int compoId) throw(INTERP_KERNEL::Exception);
2341     void applyLin(int a, int b) throw(INTERP_KERNEL::Exception);
2342     void applyInv(int numerator) throw(INTERP_KERNEL::Exception);
2343     DataArrayInt *negate() const throw(INTERP_KERNEL::Exception);
2344     void applyDivideBy(int val) throw(INTERP_KERNEL::Exception);
2345     void applyModulus(int val) throw(INTERP_KERNEL::Exception);
2346     void applyRModulus(int val) throw(INTERP_KERNEL::Exception);
2347     void applyPow(int val) throw(INTERP_KERNEL::Exception);
2348     void applyRPow(int val) throw(INTERP_KERNEL::Exception);
2349     DataArrayInt *findIdsInRange(int vmin, int vmax) const throw(INTERP_KERNEL::Exception);
2350     DataArrayInt *findIdsNotInRange(int vmin, int vmax) const throw(INTERP_KERNEL::Exception);
2351     DataArrayInt *findIdsStrictlyNegative() const throw(INTERP_KERNEL::Exception);
2352     bool checkAllIdsInRange(int vmin, int vmax) const throw(INTERP_KERNEL::Exception);
2353     static DataArrayInt *Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2) throw(INTERP_KERNEL::Exception);
2354     static DataArrayInt *Meld(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2355     static DataArrayInt *MakePartition(const std::vector<const DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups) throw(INTERP_KERNEL::Exception);
2356     static DataArrayInt *BuildUnion(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception);
2357     static DataArrayInt *BuildIntersection(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception);
2358     static DataArrayInt *FindPermutationFromFirstToSecond(const DataArrayInt *ids1, const DataArrayInt *ids2) throw(INTERP_KERNEL::Exception);
2359     DataArrayInt *buildComplement(int nbOfElement) const throw(INTERP_KERNEL::Exception);
2360     DataArrayInt *buildSubstraction(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
2361     DataArrayInt *buildSubstractionOptimized(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
2362     DataArrayInt *buildUnion(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
2363     DataArrayInt *buildIntersection(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
2364     DataArrayInt *buildUnique() const throw(INTERP_KERNEL::Exception);
2365     DataArrayInt *buildUniqueNotSorted() const throw(INTERP_KERNEL::Exception);
2366     DataArrayInt *deltaShiftIndex() const throw(INTERP_KERNEL::Exception);
2367     void computeOffsets() throw(INTERP_KERNEL::Exception);
2368     void computeOffsetsFull() throw(INTERP_KERNEL::Exception);
2369     DataArrayInt *buildExplicitArrByRanges(const DataArrayInt *offsets) const throw(INTERP_KERNEL::Exception);
2370     DataArrayInt *findRangeIdForEachTuple(const DataArrayInt *ranges) const throw(INTERP_KERNEL::Exception);
2371     DataArrayInt *findIdInRangeForEachTuple(const DataArrayInt *ranges) const throw(INTERP_KERNEL::Exception);
2372     void sortEachPairToMakeALinkedList() throw(INTERP_KERNEL::Exception);
2373     DataArrayInt *duplicateEachTupleNTimes(int nbTimes) const throw(INTERP_KERNEL::Exception);
2374     DataArrayInt *getDifferentValues() const throw(INTERP_KERNEL::Exception);
2375     static DataArrayInt *Add(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2376     void addEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2377     static DataArrayInt *Substract(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2378     void substractEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2379     static DataArrayInt *Multiply(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2380     void multiplyEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2381     static DataArrayInt *Divide(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2382     void divideEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2383     static DataArrayInt *Modulus(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2384     void modulusEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2385     static DataArrayInt *Pow(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2386     void powEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2387     MCAuto<DataArrayInt> fromLinkedListOfPairToList() const throw(INTERP_KERNEL::Exception);
2388     MCAuto<DataArrayInt> findIdsGreaterOrEqualTo(int val) const throw(INTERP_KERNEL::Exception);
2389     MCAuto<DataArrayInt> findIdsGreaterThan(int val) const throw(INTERP_KERNEL::Exception);
2390     MCAuto<DataArrayInt> findIdsLowerOrEqualTo(int val) const throw(INTERP_KERNEL::Exception);
2391     MCAuto<DataArrayInt> findIdsLowerThan(int val) const throw(INTERP_KERNEL::Exception);
2392     MCAuto<DataArrayInt> selectPartDef(const PartDefinition* pd) const throw(INTERP_KERNEL::Exception);
2393     MCAuto<DataArrayDouble> convertToDblArr() const throw(INTERP_KERNEL::Exception);
2394     MCAuto<DataArrayFloat> convertToFloatArr() const throw(INTERP_KERNEL::Exception);
2395   public:
2396     static DataArrayInt *Range(int begin, int end, int step) throw(INTERP_KERNEL::Exception);
2397     %extend
2398     {
2399       DataArrayInt() throw(INTERP_KERNEL::Exception)
2400         {
2401           return DataArrayInt::New();
2402         }
2403
2404       static DataArrayInt *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
2405       {
2406         const char *msgBase="MEDCoupling::DataArrayInt::New : Available API are : \n-DataArrayInt.New()\n-DataArrayInt.New([1,3,4])\n-DataArrayInt.New([1,3,4],3)\n-DataArrayInt.New([1,3,4,5],2,2)\n-DataArrayInt.New([1,3,4,5,7,8],3,2)\n-DataArrayInt.New([(1,3),(4,5),(7,8)])\n-DataArrayInt.New(5)\n-DataArrayInt.New(5,2)";
2407         std::string msg(msgBase);
2408 #ifdef WITH_NUMPY
2409         msg+="\n-DataArrayInt.New(numpy array with dtype=int32)";
2410 #endif
2411         msg+=" !";
2412         if(PyList_Check(elt0) || PyTuple_Check(elt0))
2413           {
2414             if(nbOfTuples)
2415               {
2416                 if(PyInt_Check(nbOfTuples))
2417                   {
2418                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
2419                     if(nbOfTuples1<0)
2420                       throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive set of allocated memory !");
2421                     if(nbOfComp)
2422                       {
2423                         if(PyInt_Check(nbOfComp))
2424                           {//DataArrayInt.New([1,3,4,5],2,2)
2425                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
2426                             if(nbOfCompo<0)
2427                               throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive number of components !");
2428                             MCAuto<DataArrayInt> ret=DataArrayInt::New();
2429                             std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
2430                             ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
2431                             return ret.retn();
2432                           }
2433                         else
2434                           throw INTERP_KERNEL::Exception(msg.c_str());
2435                       }
2436                     else
2437                       {//DataArrayInt.New([1,3,4],3)
2438                         MCAuto<DataArrayInt> ret=DataArrayInt::New();
2439                         int tmpp1=-1;
2440                         std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
2441                         ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
2442                         return ret.retn();
2443                       }
2444                   }
2445                 else
2446                   throw INTERP_KERNEL::Exception(msg.c_str());
2447               }
2448             else
2449               {// DataArrayInt.New([1,3,4])
2450                 MCAuto<DataArrayInt> ret=DataArrayInt::New();
2451                 int tmpp1=-1,tmpp2=-1;
2452                 std::vector<int> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
2453                 ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
2454                 return ret.retn();
2455               }
2456           }
2457         else if(PyInt_Check(elt0))
2458           {
2459             int nbOfTuples1=PyInt_AS_LONG(elt0);
2460             if(nbOfTuples1<0)
2461               throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive set of allocated memory !");
2462             if(nbOfTuples)
2463               {
2464                 if(!nbOfComp)
2465                   {
2466                     if(PyInt_Check(nbOfTuples))
2467                       {//DataArrayInt.New(5,2)
2468                         int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
2469                         if(nbOfCompo<0)
2470                           throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive number of components !");
2471                         MCAuto<DataArrayInt> ret=DataArrayInt::New();
2472                         ret->alloc(nbOfTuples1,nbOfCompo);
2473                         return ret.retn();
2474                       }
2475                     else
2476                       throw INTERP_KERNEL::Exception(msg.c_str());
2477                   }
2478                 else
2479                   throw INTERP_KERNEL::Exception(msg.c_str());
2480               }
2481             else
2482               {//DataArrayInt.New(5)
2483                 MCAuto<DataArrayInt> ret=DataArrayInt::New();
2484                 ret->alloc(nbOfTuples1,1);
2485                 return ret.retn();
2486               }
2487           }
2488 #ifdef WITH_NUMPY
2489         else if(PyArray_Check(elt0) && nbOfTuples==NULL && nbOfComp==NULL)
2490           {//DataArrayInt.New(numpyArray)
2491             return BuildNewInstance<DataArrayInt,int>(elt0,NPY_INT32,&PyCallBackDataArrayInt_RefType,"INT32");
2492           }
2493 #endif
2494         else
2495           throw INTERP_KERNEL::Exception(msg.c_str());
2496         throw INTERP_KERNEL::Exception(msg.c_str());//to make g++ happy
2497       }
2498
2499       DataArrayInt(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
2500         {
2501           return MEDCoupling_DataArrayInt_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
2502         }
2503       
2504       std::string __str__() const throw(INTERP_KERNEL::Exception)
2505       {
2506         return self->reprNotTooLong();
2507       }
2508
2509       int __len__() const throw(INTERP_KERNEL::Exception)
2510       {
2511         if(self->isAllocated())
2512           {
2513             return self->getNumberOfTuples();
2514           }
2515         else
2516           {
2517             throw INTERP_KERNEL::Exception("DataArrayInt::__len__ : Instance is NOT allocated !");
2518           }
2519       }
2520
2521       int __int__() const throw(INTERP_KERNEL::Exception)
2522       {
2523         return self->intValue();
2524       }
2525
2526       DataArrayIntIterator *__iter__() throw(INTERP_KERNEL::Exception)
2527       {
2528         return self->iterator();
2529       }
2530    
2531       PyObject *accumulate() const throw(INTERP_KERNEL::Exception)
2532       {
2533         int sz=self->getNumberOfComponents();
2534         INTERP_KERNEL::AutoPtr<int> tmp=new int[sz];
2535         self->accumulate(tmp);
2536         return convertIntArrToPyList(tmp,sz);
2537       }
2538
2539       DataArrayInt *accumulatePerChunck(PyObject *indexArr) const throw(INTERP_KERNEL::Exception)
2540       {
2541         int sw,sz,val;
2542         std::vector<int> val2;
2543         const int *bg=convertIntStarLikePyObjToCppIntStar(indexArr,sw,sz,val,val2);
2544         return self->accumulatePerChunck(bg,bg+sz);
2545       }
2546
2547       DataArrayInt *findIdsEqualTuple(PyObject *inputTuple) const throw(INTERP_KERNEL::Exception)
2548       {
2549         int sw,sz,val;
2550         std::vector<int> val2;
2551         const int *bg(convertIntStarLikePyObjToCppIntStar(inputTuple,sw,sz,val,val2));
2552         return self->findIdsEqualTuple(bg,bg+sz);
2553       }
2554
2555       DataArrayInt *findIdForEach(PyObject *vals) const throw(INTERP_KERNEL::Exception)
2556       {
2557         int sw,sz,val;
2558         std::vector<int> val2;
2559         const int *bg(convertIntStarLikePyObjToCppIntStar(vals,sw,sz,val,val2));
2560         MCAuto<DataArrayInt> ret(self->findIdForEach(bg,bg+sz));
2561         return ret.retn();
2562       }
2563
2564       PyObject *splitInBalancedSlices(int nbOfSlices) const throw(INTERP_KERNEL::Exception)
2565       {
2566         std::vector< std::pair<int,int> > slcs(self->splitInBalancedSlices(nbOfSlices));
2567         PyObject *ret=PyList_New(slcs.size());
2568         for(std::size_t i=0;i<slcs.size();i++)
2569           PyList_SetItem(ret,i,PySlice_New(PyInt_FromLong(slcs[i].first),PyInt_FromLong(slcs[i].second),PyInt_FromLong(1)));
2570         return ret;
2571       }
2572
2573       DataArrayInt *buildExplicitArrOfSliceOnScaledArr(PyObject *slic) const throw(INTERP_KERNEL::Exception)
2574       {
2575         if(!PySlice_Check(slic))
2576           throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr (wrap) : expecting a pyslice as second (first) parameter !");
2577         Py_ssize_t strt=2,stp=2,step=2;
2578         GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArrayInt::buildExplicitArrOfSliceOnScaledArr (wrap) : the input slice is invalid !");
2579         if(strt==std::numeric_limits<int>::max() || stp==std::numeric_limits<int>::max())
2580           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 !");
2581         return self->buildExplicitArrOfSliceOnScaledArr(strt,stp,step);
2582       }
2583
2584       PyObject *getMinMaxValues() const throw(INTERP_KERNEL::Exception)
2585       {
2586         int a,b;
2587         self->getMinMaxValues(a,b);
2588         PyObject *ret=PyTuple_New(2);
2589         PyTuple_SetItem(ret,0,PyInt_FromLong(a));
2590         PyTuple_SetItem(ret,1,PyInt_FromLong(b));
2591         return ret;
2592       }
2593    
2594       static PyObject *ConvertIndexArrayToO2N(int nbOfOldTuples, PyObject *arr, PyObject *arrI) throw(INTERP_KERNEL::Exception)
2595       {
2596         int newNbOfTuples=-1;
2597         int szArr,szArrI,sw,iTypppArr,iTypppArrI;
2598         std::vector<int> stdvecTyyppArr,stdvecTyyppArrI;
2599         const int *arrPtr=convertIntStarLikePyObjToCppIntStar(arr,sw,szArr,iTypppArr,stdvecTyyppArr);
2600         const int *arrIPtr=convertIntStarLikePyObjToCppIntStar(arrI,sw,szArrI,iTypppArrI,stdvecTyyppArrI);
2601         DataArrayInt *ret0=MEDCoupling::DataArrayInt::ConvertIndexArrayToO2N(nbOfOldTuples,arrPtr,arrIPtr,arrIPtr+szArrI,newNbOfTuples);
2602         PyObject *ret=PyTuple_New(2);
2603         PyTuple_SetItem(ret,0,SWIG_NewPointerObj((void*)ret0,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
2604         PyTuple_SetItem(ret,1,PyInt_FromLong(newNbOfTuples));
2605         return ret;
2606       }
2607
2608       static DataArrayInt *CheckAndPreparePermutation(PyObject *arr) throw(INTERP_KERNEL::Exception)
2609       {
2610         MCAuto<DataArrayInt> ret(DataArrayInt::New());
2611         int szArr,sw,iTypppArr;
2612         std::vector<int> stdvecTyyppArr;
2613         const int *arrPtr(convertIntStarLikePyObjToCppIntStar(arr,sw,szArr,iTypppArr,stdvecTyyppArr));
2614         int *pt(MEDCoupling::DataArrayInt::CheckAndPreparePermutation(arrPtr,arrPtr+szArr));
2615         ret->useArray(pt,true,MEDCoupling::C_DEALLOC,szArr,1);
2616         return ret.retn();
2617       }
2618
2619       void setValues(PyObject *li, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
2620       {
2621         const char *msg="MEDCoupling::DataArrayInt::setValues : Available API are : \n-DataArrayInt.setValues([1,3,4])\n-DataArrayInt.setValues([1,3,4],3)\n-DataArrayInt.setValues([1,3,4,5],2,2)\n-DataArrayInt.New(5)\n !";
2622         if(PyList_Check(li) || PyTuple_Check(li))
2623           {
2624             if(nbOfTuples && nbOfTuples != Py_None)
2625               {
2626                 if(PyInt_Check(nbOfTuples))
2627                   {
2628                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
2629                     if(nbOfTuples<0)
2630                       throw INTERP_KERNEL::Exception("DataArrayInt::setValue : should be a positive set of allocated memory !");
2631                     if(nbOfComp && nbOfComp != Py_None)
2632                       {
2633                         if(PyInt_Check(nbOfComp))
2634                           {//DataArrayInt.setValues([1,3,4,5],2,2)
2635                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
2636                             if(nbOfCompo<0)
2637                               throw INTERP_KERNEL::Exception("DataArrayInt::setValue : should be a positive number of components !");
2638                             std::vector<int> tmp=fillArrayWithPyListInt2(li,nbOfTuples1,nbOfCompo);
2639                             self->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),self->getPointer());
2640                           }
2641                         else
2642                           throw INTERP_KERNEL::Exception(msg);
2643                       }
2644                     else
2645                       {//DataArrayInt.setValues([1,3,4],3)
2646                         int tmpp1=-1;
2647                         std::vector<int> tmp=fillArrayWithPyListInt2(li,nbOfTuples1,tmpp1);
2648                         self->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),self->getPointer());
2649                       }
2650                   }
2651                 else
2652                   throw INTERP_KERNEL::Exception(msg);
2653               }
2654             else
2655               {// DataArrayInt.setValues([1,3,4])
2656                 int tmpp1=-1,tmpp2=-1;
2657                 std::vector<int> tmp=fillArrayWithPyListInt2(li,tmpp1,tmpp2);
2658                 self->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),self->getPointer());
2659               }
2660           }
2661         else
2662           throw INTERP_KERNEL::Exception(msg);
2663       }
2664
2665       PyObject *getValues() const throw(INTERP_KERNEL::Exception)
2666       {
2667         const int *vals=self->getConstPointer();
2668         return convertIntArrToPyList(vals,self->getNbOfElems());
2669       }
2670
2671 #ifdef WITH_NUMPY
2672       PyObject *toNumPyArray() throw(INTERP_KERNEL::Exception) // not const. It is not a bug !
2673       {
2674         return ToNumPyArray<DataArrayInt,int>(self,NPY_INT32,"DataArrayInt");
2675       }
2676 #endif
2677
2678       PyObject *isEqualIfNotWhy(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception)
2679       {
2680         std::string ret1;
2681         bool ret0=self->isEqualIfNotWhy(other,ret1);
2682         PyObject *ret=PyTuple_New(2);
2683         PyObject *ret0Py=ret0?Py_True:Py_False;
2684         Py_XINCREF(ret0Py);
2685         PyTuple_SetItem(ret,0,ret0Py);
2686         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
2687         return ret;
2688       }
2689
2690       PyObject *getValuesAsTuple() const throw(INTERP_KERNEL::Exception)
2691       {
2692         const int *vals=self->getConstPointer();
2693         int nbOfComp=self->getNumberOfComponents();
2694         int nbOfTuples=self->getNumberOfTuples();
2695         return convertIntArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
2696       }
2697
2698       static PyObject *MakePartition(PyObject *gps, int newNb) throw(INTERP_KERNEL::Exception)
2699       {
2700         std::vector<const DataArrayInt *> groups;
2701         std::vector< std::vector<int> > fidsOfGroups;
2702         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(gps,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",groups);
2703         MEDCoupling::DataArrayInt *ret0=MEDCoupling::DataArrayInt::MakePartition(groups,newNb,fidsOfGroups);
2704         PyObject *ret = PyList_New(2);
2705         PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2706         int sz=fidsOfGroups.size();
2707         PyObject *ret1 = PyList_New(sz);
2708         for(int i=0;i<sz;i++)
2709           PyList_SetItem(ret1,i,convertIntArrToPyList2(fidsOfGroups[i]));
2710         PyList_SetItem(ret,1,ret1);
2711         return ret;
2712       }
2713
2714       void transformWithIndArr(PyObject *li) throw(INTERP_KERNEL::Exception)
2715       {
2716         void *da=0;
2717         int res1(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 ));
2718         if (!SWIG_IsOK(res1))
2719           {
2720             int res2(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__MapII, 0 |  0 ));
2721             if(SWIG_IsOK(res2))
2722               {
2723                 MapII *m=reinterpret_cast<MapII *>(da);
2724                 self->transformWithIndArr(*m);
2725               }
2726             else
2727               {
2728                 int size;
2729                 INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2730                 self->transformWithIndArr(tmp,tmp+size);
2731               }
2732           }
2733         else
2734           {
2735             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2736             self->transformWithIndArr(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
2737           }
2738       }
2739
2740       DataArrayInt *findIdsEqualList(PyObject *obj) throw(INTERP_KERNEL::Exception)
2741       {
2742         int sw;
2743         int singleVal;
2744         std::vector<int> multiVal;
2745         std::pair<int, std::pair<int,int> > slic;
2746         MEDCoupling::DataArrayInt *daIntTyypp=0;
2747         convertIntStarOrSliceLikePyObjToCpp(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
2748         switch(sw)
2749           {
2750           case 1:
2751             return self->findIdsEqualList(&singleVal,&singleVal+1);
2752           case 2:
2753             return self->findIdsEqualList(&multiVal[0],&multiVal[0]+multiVal.size());
2754           case 4:
2755             return self->findIdsEqualList(daIntTyypp->begin(),daIntTyypp->end());
2756           default:
2757             throw INTERP_KERNEL::Exception("DataArrayInt::findIdsEqualList : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2758           }
2759       }
2760
2761       DataArrayInt *findIdsNotEqualList(PyObject *obj) throw(INTERP_KERNEL::Exception)
2762       {
2763         int sw;
2764         int singleVal;
2765         std::vector<int> multiVal;
2766         std::pair<int, std::pair<int,int> > slic;
2767         MEDCoupling::DataArrayInt *daIntTyypp=0;
2768         convertIntStarOrSliceLikePyObjToCpp(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
2769         switch(sw)
2770           {
2771           case 1:
2772             return self->findIdsNotEqualList(&singleVal,&singleVal+1);
2773           case 2:
2774             return self->findIdsNotEqualList(&multiVal[0],&multiVal[0]+multiVal.size());
2775           case 4:
2776             return self->findIdsNotEqualList(daIntTyypp->begin(),daIntTyypp->end());
2777           default:
2778             throw INTERP_KERNEL::Exception("DataArrayInt::findIdsNotEqualList : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2779           }
2780       }
2781
2782       PyObject *splitByValueRange(PyObject *li) const throw(INTERP_KERNEL::Exception)
2783       {
2784         DataArrayInt *ret0=0,*ret1=0,*ret2=0;
2785         void *da=0;
2786         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
2787         if (!SWIG_IsOK(res1))
2788           {
2789             int size;
2790             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2791             self->splitByValueRange(tmp,(int *)tmp+size,ret0,ret1,ret2);
2792           }
2793         else
2794           {
2795             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2796             if(!da2)
2797               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2798             da2->checkAllocated();
2799             self->splitByValueRange(da2->begin(),da2->end(),ret0,ret1,ret2);
2800           }
2801         PyObject *ret = PyList_New(3);
2802         PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2803         PyList_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2804         PyList_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2805         return ret;
2806       }
2807
2808       DataArrayInt *transformWithIndArrR(PyObject *li) const throw(INTERP_KERNEL::Exception)
2809       {
2810         void *da=0;
2811         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
2812         if (!SWIG_IsOK(res1))
2813           {
2814             int size;
2815             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2816             return self->transformWithIndArrR(tmp,tmp+size);
2817           }
2818         else
2819           {
2820             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2821             return self->transformWithIndArrR(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
2822           }
2823       }
2824
2825       DataArrayInt *renumberAndReduce(PyObject *li, int newNbOfTuple) throw(INTERP_KERNEL::Exception)
2826       {
2827         void *da=0;
2828         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
2829         if (!SWIG_IsOK(res1))
2830           {
2831             int size;
2832             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2833             if(size!=self->getNumberOfTuples())
2834               {
2835                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2836               }
2837             return self->renumberAndReduce(tmp,newNbOfTuple);
2838           }
2839         else
2840           {
2841             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2842             if(!da2)
2843               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2844             da2->checkAllocated();
2845             int size=self->getNumberOfTuples();
2846             if(size!=self->getNumberOfTuples())
2847               {
2848                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2849               }
2850             return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
2851           }
2852       }
2853
2854       DataArrayInt *renumber(PyObject *li) throw(INTERP_KERNEL::Exception)
2855       {
2856         void *da=0;
2857         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
2858         if (!SWIG_IsOK(res1))
2859           {
2860             int size;
2861             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2862             if(size!=self->getNumberOfTuples())
2863               {
2864                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2865               }
2866             return self->renumber(tmp);
2867           }
2868         else
2869           {
2870             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2871             if(!da2)
2872               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2873             da2->checkAllocated();
2874             int size=self->getNumberOfTuples();
2875             if(size!=self->getNumberOfTuples())
2876               {
2877                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2878               }
2879             return self->renumber(da2->getConstPointer());
2880           }
2881       }
2882
2883       DataArrayInt *renumberR(PyObject *li) throw(INTERP_KERNEL::Exception)
2884       {
2885         void *da=0;
2886         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
2887         if (!SWIG_IsOK(res1))
2888           {
2889             int size;
2890             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2891             if(size!=self->getNumberOfTuples())
2892               {
2893                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2894               }
2895             return self->renumberR(tmp);
2896           }
2897         else
2898           {
2899             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2900             if(!da2)
2901               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2902             da2->checkAllocated();
2903             int size=self->getNumberOfTuples();
2904             if(size!=self->getNumberOfTuples())
2905               {
2906                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2907               }
2908             return self->renumberR(da2->getConstPointer());
2909           }
2910       }
2911
2912       void setSelectedComponents(const DataArrayInt *a, PyObject *li) throw(INTERP_KERNEL::Exception)
2913       {
2914         std::vector<int> tmp;
2915         convertPyToNewIntArr3(li,tmp);
2916         self->setSelectedComponents(a,tmp);
2917       }
2918
2919       PyObject *explodeComponents() const throw(INTERP_KERNEL::Exception)
2920       {
2921         std::vector< MCAuto<DataArrayInt> > retCpp(self->explodeComponents());
2922         std::size_t sz(retCpp.size());
2923         PyObject *res(PyList_New(sz));
2924         for(std::size_t i=0;i<sz;i++)
2925           PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i].retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2926         return res;
2927       }
2928
2929       PyObject *getTuple(int tupleId) throw(INTERP_KERNEL::Exception)
2930       {
2931         int sz=self->getNumberOfComponents();
2932         INTERP_KERNEL::AutoPtr<int> tmp=new int[sz];
2933         self->getTuple(tupleId,tmp);
2934         return convertIntArrToPyList(tmp,sz);
2935       }
2936
2937       PyObject *changeSurjectiveFormat(int targetNb) const throw(INTERP_KERNEL::Exception)
2938       {
2939         DataArrayInt *arr=0;
2940         DataArrayInt *arrI=0;
2941         self->changeSurjectiveFormat(targetNb,arr,arrI);
2942         PyObject *res = PyList_New(2);
2943         PyList_SetItem(res,0,SWIG_NewPointerObj((void*)arr,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
2944         PyList_SetItem(res,1,SWIG_NewPointerObj((void*)arrI,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
2945         return res;
2946       }
2947
2948       static DataArrayInt *Meld(PyObject *li) throw(INTERP_KERNEL::Exception)
2949       {
2950         std::vector<const DataArrayInt *> tmp;
2951         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
2952         return DataArrayInt::Meld(tmp);
2953       }
2954
2955       static DataArrayInt *Aggregate(PyObject *li) throw(INTERP_KERNEL::Exception)
2956       {
2957         std::vector<const DataArrayInt *> tmp;
2958         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
2959         return DataArrayInt::Aggregate(tmp);
2960       }
2961
2962       static DataArrayInt *AggregateIndexes(PyObject *li) throw(INTERP_KERNEL::Exception)
2963       {
2964         std::vector<const DataArrayInt *> tmp;
2965         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
2966         return DataArrayInt::AggregateIndexes(tmp);
2967       }
2968
2969       static DataArrayInt *BuildUnion(PyObject *li) throw(INTERP_KERNEL::Exception)
2970       {
2971         std::vector<const DataArrayInt *> tmp;
2972         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
2973         return DataArrayInt::BuildUnion(tmp);
2974       }
2975
2976       static DataArrayInt *BuildIntersection(PyObject *li) throw(INTERP_KERNEL::Exception)
2977       {
2978         std::vector<const DataArrayInt *> tmp;
2979         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
2980         return DataArrayInt::BuildIntersection(tmp);
2981       }
2982
2983       PyObject *getMaxValue() const throw(INTERP_KERNEL::Exception)
2984       {
2985         int tmp;
2986         int r1=self->getMaxValue(tmp);
2987         PyObject *ret=PyTuple_New(2);
2988         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
2989         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
2990         return ret;
2991       }
2992     
2993       PyObject *getMaxAbsValue(std::size_t& tupleId) const throw(INTERP_KERNEL::Exception)
2994       {
2995         std::size_t tmp;
2996         int r1=self->getMaxAbsValue(tmp);
2997         PyObject *ret=PyTuple_New(2);
2998         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
2999         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
3000         return ret;
3001       }
3002
3003       PyObject *getMinValue() const throw(INTERP_KERNEL::Exception)
3004       {
3005         int tmp;
3006         int r1=self->getMinValue(tmp);
3007         PyObject *ret=PyTuple_New(2);
3008         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
3009         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
3010         return ret;
3011       }
3012
3013       int index(PyObject *obj) const throw(INTERP_KERNEL::Exception)
3014       {
3015         int nbOfCompo=self->getNumberOfComponents();
3016         switch(nbOfCompo)
3017           {
3018           case 1:
3019             {
3020               if(PyInt_Check(obj))
3021                 {
3022                   int val=(int)PyInt_AS_LONG(obj);
3023                   return self->findIdFirstEqual(val);
3024                 }
3025               else
3026                 throw INTERP_KERNEL::Exception("DataArrayInt::index : 'this' contains one component and trying to find an element which is not an integer !");
3027             }
3028           default:
3029             {
3030               std::vector<int> arr;
3031               convertPyToNewIntArr3(obj,arr);
3032               return self->findIdFirstEqualTuple(arr);
3033             }
3034           }
3035       }
3036
3037       bool __contains__(PyObject *obj) const throw(INTERP_KERNEL::Exception)
3038       {
3039         int nbOfCompo=self->getNumberOfComponents();
3040         switch(nbOfCompo)
3041           {
3042           case 0:
3043             return false;
3044           case 1:
3045             {
3046               if(PyInt_Check(obj))
3047                 {
3048                   int val=(int)PyInt_AS_LONG(obj);
3049                   return self->presenceOfValue(val);
3050                 }
3051               else
3052                 throw INTERP_KERNEL::Exception("DataArrayInt::__contains__ : 'this' contains one component and trying to find an element which is not an integer !");
3053             }
3054           default:
3055             {
3056               std::vector<int> arr;
3057               convertPyToNewIntArr3(obj,arr);
3058               return self->presenceOfTuple(arr);
3059             }
3060           }
3061       }
3062
3063       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3064       {
3065         const char msg[]="Unexpected situation in DataArrayInt::__getitem__ !";
3066         const char msg2[]="DataArrayInt::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
3067         self->checkAllocated();
3068         int nbOfTuples=self->getNumberOfTuples();
3069         int nbOfComponents=self->getNumberOfComponents();
3070         int it1,ic1;
3071         std::vector<int> vt1,vc1;
3072         std::pair<int, std::pair<int,int> > pt1,pc1;
3073         DataArrayInt *dt1=0,*dc1=0;
3074         int sw;
3075         convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
3076         MCAuto<DataArrayInt> ret;
3077         switch(sw)
3078           {
3079           case 1:
3080             {
3081               if(nbOfComponents==1)
3082                 return PyInt_FromLong(self->getIJSafe(it1,0));
3083               return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&it1,&it1+1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3084             }
3085           case 2:
3086             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size())),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3087           case 3:
3088             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3089           case 4:
3090             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems())),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3091           case 5:
3092             return PyInt_FromLong(self->getIJSafe(it1,ic1));
3093           case 6:
3094             {
3095               ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
3096               std::vector<int> v2(1,ic1);
3097               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3098             }
3099           case 7:
3100             {
3101               ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
3102               std::vector<int> v2(1,ic1);
3103               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3104             }
3105           case 8:
3106             {
3107               ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
3108               std::vector<int> v2(1,ic1);
3109               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3110             }
3111           case 9:
3112             {
3113               ret=self->selectByTupleIdSafe(&it1,&it1+1);
3114               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3115             }
3116           case 10:
3117             {
3118               ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
3119               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3120             }
3121           case 11:
3122             {
3123               ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
3124               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3125             }
3126           case 12:
3127             {
3128               ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
3129               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3130             }
3131           case 13:
3132             {
3133               ret=self->selectByTupleIdSafe(&it1,&it1+1);
3134               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
3135               std::vector<int> v2(nbOfComp);
3136               for(int i=0;i<nbOfComp;i++)
3137                 v2[i]=pc1.first+i*pc1.second.second;
3138               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3139             }
3140           case 14:
3141             {
3142               ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
3143               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
3144               std::vector<int> v2(nbOfComp);
3145               for(int i=0;i<nbOfComp;i++)
3146                 v2[i]=pc1.first+i*pc1.second.second;
3147               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3148             }
3149           case 15:
3150             {
3151               ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
3152               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
3153               std::vector<int> v2(nbOfComp);
3154               for(int i=0;i<nbOfComp;i++)
3155                 v2[i]=pc1.first+i*pc1.second.second;
3156               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3157             }
3158           case 16:
3159             {
3160               ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
3161               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
3162               std::vector<int> v2(nbOfComp);
3163               for(int i=0;i<nbOfComp;i++)
3164                 v2[i]=pc1.first+i*pc1.second.second;
3165               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3166             }
3167           default:
3168             throw INTERP_KERNEL::Exception(msg);
3169           }
3170       }
3171
3172       DataArrayInt *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
3173       {
3174         self->checkAllocated();
3175         const char msg[]="Unexpected situation in __setitem__ !";
3176         int nbOfTuples=self->getNumberOfTuples();
3177         int nbOfComponents=self->getNumberOfComponents();
3178         int sw1,sw2;
3179         int i1;
3180         std::vector<int> v1;
3181         DataArrayInt *d1=0;
3182         DataArrayIntTuple *dd1=0;
3183         convertIntStarLikePyObjToCpp(value,sw1,i1,v1,d1,dd1);
3184         int it1,ic1;
3185         std::vector<int> vt1,vc1;
3186         std::pair<int, std::pair<int,int> > pt1,pc1;
3187         DataArrayInt *dt1=0,*dc1=0;
3188         convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw2,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
3189         MCAuto<DataArrayInt> tmp;
3190         switch(sw2)
3191           {
3192           case 1:
3193             {
3194               switch(sw1)
3195                 {
3196                 case 1:
3197                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,0,nbOfComponents,1);
3198                   return self;
3199                 case 2:
3200                   tmp=DataArrayInt::New();
3201                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3202                   self->setPartOfValues1(tmp,it1,it1+1,1,0,nbOfComponents,1,false);
3203                   return self;
3204                 case 3:
3205                   self->setPartOfValues1(d1,it1,it1+1,1,0,nbOfComponents,1);
3206                   return self;
3207                 case 4:
3208                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3209                   self->setPartOfValues1(tmp,it1,it1+1,1,0,nbOfComponents,1);
3210                   return self;
3211                 default:
3212                   throw INTERP_KERNEL::Exception(msg);
3213                 }
3214               break;
3215             }
3216           case 2:
3217             {
3218               switch(sw1)
3219                 {
3220                 case 1:
3221                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
3222                   return self;
3223                 case 2:
3224                   tmp=DataArrayInt::New();
3225                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3226                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1,false);
3227                   return self;
3228                 case 3:
3229                   self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
3230                   return self;
3231                 case 4:
3232                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3233                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
3234                   return self;
3235                 default:
3236                   throw INTERP_KERNEL::Exception(msg);
3237                 }
3238               break;
3239             }
3240           case 3:
3241             {
3242               switch(sw1)
3243                 {
3244                 case 1:
3245                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
3246                   return self;
3247                 case 2:
3248                   tmp=DataArrayInt::New();
3249                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3250                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1,false);
3251                   return self;
3252                 case 3:
3253                   self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
3254                   return self;
3255                 case 4:
3256                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3257                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
3258                   return self;
3259                 default:
3260                   throw INTERP_KERNEL::Exception(msg);
3261                 }
3262               break;
3263             }
3264           case 4:
3265             {
3266               switch(sw1)
3267                 {
3268                 case 1:
3269                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
3270                   return self;
3271                 case 2:
3272                   tmp=DataArrayInt::New();
3273                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3274                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1,false);
3275                   return self;
3276                 case 3:
3277                   self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
3278                   return self;
3279                 case 4:
3280                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3281                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
3282                   return self;
3283                 default:
3284                   throw INTERP_KERNEL::Exception(msg);
3285                 }
3286               break;
3287             }
3288           case 5:
3289             {
3290               switch(sw1)
3291                 {
3292                 case 1:
3293                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,ic1,ic1+1,1);
3294                   return self;
3295                 case 2:
3296                   tmp=DataArrayInt::New();
3297                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3298                   self->setPartOfValues1(tmp,it1,it1+1,1,ic1,ic1+1,1,false);
3299                   return self;
3300                 case 3:
3301                   self->setPartOfValues1(d1,it1,it1+1,1,ic1,ic1+1,1);
3302                   return self;
3303                 case 4:
3304                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3305                   self->setPartOfValues1(tmp,it1,it1+1,1,ic1,ic1+1,1);
3306                   return self;
3307                 default:
3308                   throw INTERP_KERNEL::Exception(msg);
3309                 }
3310               break;
3311             }
3312           case 6:
3313             {
3314               switch(sw1)
3315                 {
3316                 case 1:
3317                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
3318                   return self;
3319                 case 2:
3320                   tmp=DataArrayInt::New();
3321                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3322                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1,false);
3323                   return self;
3324                 case 3:
3325                   self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
3326                   return self;
3327                 case 4:
3328                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3329                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
3330                   return self;
3331                 default:
3332                   throw INTERP_KERNEL::Exception(msg);
3333                 }
3334               break;
3335             }
3336           case 7:
3337             {
3338               switch(sw1)
3339                 {
3340                 case 1:
3341                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
3342                   return self;
3343                 case 2:
3344                   tmp=DataArrayInt::New();
3345                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3346                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1,false);
3347                   return self;
3348                 case 3:
3349                   self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
3350                   return self;
3351                 case 4:
3352                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3353                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
3354                   return self;
3355                 default:
3356                   throw INTERP_KERNEL::Exception(msg);
3357                 }
3358               break;
3359             }
3360           case 8:
3361             {
3362               switch(sw1)
3363                 {
3364                 case 1:
3365                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
3366                   return self;
3367                 case 2:
3368                   tmp=DataArrayInt::New();
3369                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3370                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1,false);
3371                   return self;
3372                 case 3:
3373                   self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
3374                   return self;
3375                 case 4:
3376                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3377                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
3378                   return self;
3379                 default:
3380                   throw INTERP_KERNEL::Exception(msg);
3381                 }
3382               break;
3383             }
3384           case 9:
3385             {
3386               switch(sw1)
3387                 {
3388                 case 1:
3389                   self->setPartOfValuesSimple2(i1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
3390                   return self;
3391                 case 2:
3392                   tmp=DataArrayInt::New();
3393                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3394                   self->setPartOfValues2(tmp,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size(),false);
3395                   return self;
3396                 case 3:
3397                   self->setPartOfValues2(d1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
3398                   return self;
3399                 case 4:
3400                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3401                   self->setPartOfValues2(tmp,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
3402                   return self;
3403                 default:
3404                   throw INTERP_KERNEL::Exception(msg);
3405                 }
3406               break;
3407             }
3408           case 10:
3409             {
3410               switch(sw1)
3411                 {
3412                 case 1:
3413                   self->setPartOfValuesSimple2(i1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
3414                   return self;
3415                 case 2:
3416                   tmp=DataArrayInt::New();
3417                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3418                   self->setPartOfValues2(tmp,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size(),false);
3419                   return self;
3420                 case 3:
3421                   self->setPartOfValues2(d1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
3422                   return self;
3423                 case 4:
3424                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3425                   self->setPartOfValues2(tmp,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
3426                   return self;
3427                 default:
3428                   throw INTERP_KERNEL::Exception(msg);
3429                 }
3430               break;
3431             }
3432           case 11:
3433             {
3434               switch(sw1)
3435                 {
3436                 case 1:
3437                   self->setPartOfValuesSimple4(i1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
3438                   return self;
3439                 case 2:
3440                   tmp=DataArrayInt::New();
3441                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3442                   self->setPartOfValues4(tmp,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size(),false);
3443                   return self;
3444                 case 3:
3445                   self->setPartOfValues4(d1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
3446                   return self;
3447                 case 4:
3448                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3449                   self->setPartOfValues4(tmp,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
3450                   return self;
3451                 default:
3452                   throw INTERP_KERNEL::Exception(msg);
3453                 }
3454               break;
3455             }
3456           case 12:
3457             {
3458               switch(sw1)
3459                 {
3460                 case 1:
3461                   self->setPartOfValuesSimple2(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
3462                   return self;
3463                 case 2:
3464                   tmp=DataArrayInt::New();
3465                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3466                   self->setPartOfValues2(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size(),false);
3467                   return self;
3468                 case 3:
3469                   self->setPartOfValues2(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
3470                   return self;
3471                 case 4:
3472                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3473                   self->setPartOfValues2(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
3474                   return self;
3475                 default:
3476                   throw INTERP_KERNEL::Exception(msg);
3477                 }
3478               break;
3479             }
3480           case 13:
3481             {
3482               switch(sw1)
3483                 {
3484                 case 1:
3485                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
3486                   return self;
3487                 case 2:
3488                   tmp=DataArrayInt::New();
3489                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3490                   self->setPartOfValues1(tmp,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second,false);
3491                   return self;
3492                 case 3:
3493                   self->setPartOfValues1(d1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
3494                   return self;
3495                 case 4:
3496                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3497                   self->setPartOfValues1(tmp,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
3498                   return self;
3499                 default:
3500                   throw INTERP_KERNEL::Exception(msg);
3501                 }
3502               break;
3503             }
3504           case 14:
3505             {
3506               switch(sw1)
3507                 {
3508                 case 1:
3509                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
3510                   return self;
3511                 case 2:
3512                   tmp=DataArrayInt::New();
3513                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3514                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second,false);
3515                   return self;
3516                 case 3:
3517                   self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
3518                   return self;
3519                 case 4:
3520                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3521                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
3522                   return self;
3523                 default:
3524                   throw INTERP_KERNEL::Exception(msg);
3525                 }
3526               break;
3527             }
3528           case 15:
3529             {
3530               switch(sw1)
3531                 {
3532                 case 1:
3533                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
3534                   return self;
3535                 case 2:
3536                   tmp=DataArrayInt::New();
3537                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3538                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second,false);
3539                   return self;
3540                 case 3:
3541                   self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
3542                   return self;
3543                 case 4:
3544                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3545                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
3546                   return self;
3547                 default:
3548                   throw INTERP_KERNEL::Exception(msg);
3549                 }
3550               break;
3551             }
3552           case 16:
3553             {
3554               switch(sw1)
3555                 {
3556                 case 1:
3557                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
3558                   return self;
3559                 case 2:
3560                   tmp=DataArrayInt::New();
3561                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3562                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second,false);
3563                   return self;
3564                 case 3:
3565                   self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
3566                   return self;
3567                 case 4:
3568                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3569                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
3570                   return self;
3571                 default:
3572                   throw INTERP_KERNEL::Exception(msg);
3573                 }
3574               break;
3575             }
3576           default:
3577             throw INTERP_KERNEL::Exception(msg);
3578           }
3579         return self;
3580       }
3581
3582       DataArrayInt *__neg__() const throw(INTERP_KERNEL::Exception)
3583       {
3584         return self->negate();
3585       }
3586  
3587       DataArrayInt *__add__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3588       {
3589         const char msg[]="Unexpected situation in __add__ !";
3590         int val;
3591         DataArrayInt *a;
3592         std::vector<int> aa;
3593         DataArrayIntTuple *aaa;
3594         int sw;
3595         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3596         switch(sw)
3597           {
3598           case 1:
3599             {
3600               MCAuto<DataArrayInt> ret=self->deepCopy();
3601               ret->applyLin(1,val);
3602               return ret.retn();
3603             }
3604           case 2:
3605             {
3606               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3607               return DataArrayInt::Add(self,aaaa);
3608             }
3609           case 3:
3610             {
3611               return DataArrayInt::Add(self,a);
3612             }
3613           case 4:
3614             {
3615               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3616               return DataArrayInt::Add(self,aaaa);
3617             }
3618           default:
3619             throw INTERP_KERNEL::Exception(msg);
3620           }
3621       }
3622
3623       DataArrayInt *__radd__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3624       {
3625         const char msg[]="Unexpected situation in __radd__ !";
3626         int val;
3627         DataArrayInt *a;
3628         std::vector<int> aa;
3629         DataArrayIntTuple *aaa;
3630         int sw;
3631         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3632         switch(sw)
3633           {
3634           case 1:
3635             {
3636               MCAuto<DataArrayInt> ret=self->deepCopy();
3637               ret->applyLin(1,val);
3638               return ret.retn();
3639             }
3640           case 2:
3641             {
3642               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3643               return DataArrayInt::Add(self,aaaa);
3644             }
3645           case 4:
3646             {
3647               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3648               return DataArrayInt::Add(self,aaaa);
3649             }
3650           default:
3651             throw INTERP_KERNEL::Exception(msg);
3652           }
3653       }
3654
3655       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
3656       {
3657         const char msg[]="Unexpected situation in __iadd__ !";
3658         int val;
3659         DataArrayInt *a;
3660         std::vector<int> aa;
3661         DataArrayIntTuple *aaa;
3662         int sw;
3663         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3664         switch(sw)
3665           {
3666           case 1:
3667             {
3668               self->applyLin(1,val);
3669               Py_XINCREF(trueSelf);
3670               return trueSelf;
3671             }
3672           case 2:
3673             {
3674               MCAuto<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3675               self->addEqual(bb);
3676               Py_XINCREF(trueSelf);
3677               return trueSelf;
3678             }
3679           case 3:
3680             {
3681               self->addEqual(a);
3682               Py_XINCREF(trueSelf);
3683               return trueSelf;
3684             }
3685           case 4:
3686             {
3687               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3688               self->addEqual(aaaa);
3689               Py_XINCREF(trueSelf);
3690               return trueSelf;
3691             }
3692           default:
3693             throw INTERP_KERNEL::Exception(msg);
3694           }
3695       }
3696
3697       DataArrayInt *__sub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3698       {
3699         const char msg[]="Unexpected situation in __sub__ !";
3700         int val;
3701         DataArrayInt *a;
3702         std::vector<int> aa;
3703         DataArrayIntTuple *aaa;
3704         int sw;
3705         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3706         switch(sw)
3707           {
3708           case 1:
3709             {
3710               MCAuto<DataArrayInt> ret=self->deepCopy();
3711               ret->applyLin(1,-val);
3712               return ret.retn();
3713             }
3714           case 2:
3715             {
3716               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3717               return DataArrayInt::Substract(self,aaaa);
3718             }
3719           case 3:
3720             {
3721               return DataArrayInt::Substract(self,a);
3722             }
3723           case 4:
3724             {
3725               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3726               return DataArrayInt::Substract(self,aaaa);
3727             }
3728           default:
3729             throw INTERP_KERNEL::Exception(msg);
3730           }
3731       }
3732
3733       DataArrayInt *__rsub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3734       {
3735         const char msg[]="Unexpected situation in __rsub__ !";
3736         int val;
3737         DataArrayInt *a;
3738         std::vector<int> aa;
3739         DataArrayIntTuple *aaa;
3740         int sw;
3741         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3742         switch(sw)
3743           {
3744           case 1:
3745             {
3746               MCAuto<DataArrayInt> ret=self->deepCopy();
3747               ret->applyLin(-1,val);
3748               return ret.retn();
3749             }
3750           case 2:
3751             {
3752               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3753               return DataArrayInt::Substract(aaaa,self);
3754             }
3755           case 4:
3756             {
3757               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3758               return DataArrayInt::Substract(aaaa,self);
3759             }
3760           default:
3761             throw INTERP_KERNEL::Exception(msg);
3762           }
3763       }
3764
3765       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
3766       {
3767         const char msg[]="Unexpected situation in __isub__ !";
3768         int val;
3769         DataArrayInt *a;
3770         std::vector<int> aa;
3771         DataArrayIntTuple *aaa;
3772         int sw;
3773         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3774         switch(sw)
3775           {
3776           case 1:
3777             {
3778               self->applyLin(1,-val);
3779               Py_XINCREF(trueSelf);
3780               return trueSelf;
3781             }
3782           case 2:
3783             {
3784               MCAuto<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3785               self->substractEqual(bb);
3786               Py_XINCREF(trueSelf);
3787               return trueSelf;
3788             }
3789           case 3:
3790             {
3791               self->substractEqual(a);
3792               Py_XINCREF(trueSelf);
3793               return trueSelf;
3794             }
3795           case 4:
3796             {
3797               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3798               self->substractEqual(aaaa);
3799               Py_XINCREF(trueSelf);
3800               return trueSelf;
3801             }
3802           default:
3803             throw INTERP_KERNEL::Exception(msg);
3804           }
3805       }
3806
3807       DataArrayInt *__mul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3808       {
3809         const char msg[]="Unexpected situation in __mul__ !";
3810         int val;
3811         DataArrayInt *a;
3812         std::vector<int> aa;
3813         DataArrayIntTuple *aaa;
3814         int sw;
3815         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3816         switch(sw)
3817           {
3818           case 1:
3819             {
3820               MCAuto<DataArrayInt> ret=self->deepCopy();
3821               ret->applyLin(val,0);
3822               return ret.retn();
3823             }
3824           case 2:
3825             {
3826               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3827               return DataArrayInt::Multiply(self,aaaa);
3828             }
3829           case 3:
3830             {
3831               return DataArrayInt::Multiply(self,a);
3832             }
3833           case 4:
3834             {
3835               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3836               return DataArrayInt::Multiply(self,aaaa);
3837             }
3838           default:
3839             throw INTERP_KERNEL::Exception(msg);
3840           }
3841       }
3842
3843       DataArrayInt *__rmul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3844       {
3845         const char msg[]="Unexpected situation in __rmul__ !";
3846         int val;
3847         DataArrayInt *a;
3848         std::vector<int> aa;
3849         DataArrayIntTuple *aaa;
3850         int sw;
3851         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3852         switch(sw)
3853           {
3854           case 1:
3855             {
3856               MCAuto<DataArrayInt> ret=self->deepCopy();
3857               ret->applyLin(val,0);
3858               return ret.retn();
3859             }
3860           case 2:
3861             {
3862               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3863               return DataArrayInt::Multiply(self,aaaa);
3864             }
3865           case 4:
3866             {
3867               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3868               return DataArrayInt::Multiply(self,aaaa);
3869             }
3870           default:
3871             throw INTERP_KERNEL::Exception(msg);
3872           }
3873       }
3874
3875       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
3876       {
3877         const char msg[]="Unexpected situation in __imul__ !";
3878         int val;
3879         DataArrayInt *a;
3880         std::vector<int> aa;
3881         DataArrayIntTuple *aaa;
3882         int sw;
3883         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3884         switch(sw)
3885           {
3886           case 1:
3887             {
3888               self->applyLin(val,0);
3889               Py_XINCREF(trueSelf);
3890               return trueSelf;
3891             }
3892           case 2:
3893             {
3894               MCAuto<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3895               self->multiplyEqual(bb);
3896               Py_XINCREF(trueSelf);
3897               return trueSelf;
3898             }
3899           case 3:
3900             {
3901               self->multiplyEqual(a);
3902               Py_XINCREF(trueSelf);
3903               return trueSelf;
3904             }
3905           case 4:
3906             {
3907               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3908               self->multiplyEqual(aaaa);
3909               Py_XINCREF(trueSelf);
3910               return trueSelf;
3911             }
3912           default:
3913             throw INTERP_KERNEL::Exception(msg);
3914           }
3915       }
3916
3917       DataArrayInt *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3918       {
3919         const char msg[]="Unexpected situation in __div__ !";
3920         int val;
3921         DataArrayInt *a;
3922         std::vector<int> aa;
3923         DataArrayIntTuple *aaa;
3924         int sw;
3925         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3926         switch(sw)
3927           {
3928           case 1:
3929             {
3930               MCAuto<DataArrayInt> ret=self->deepCopy();
3931               ret->applyDivideBy(val);
3932               return ret.retn();
3933             }
3934           case 2:
3935             {
3936               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3937               return DataArrayInt::Divide(self,aaaa);
3938             }
3939           case 3:
3940             {
3941               return DataArrayInt::Divide(self,a);
3942             }
3943           case 4:
3944             {
3945               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3946               return DataArrayInt::Divide(self,aaaa);
3947             }
3948           default:
3949             throw INTERP_KERNEL::Exception(msg);
3950           }
3951       }
3952
3953       DataArrayInt *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3954       {
3955         const char msg[]="Unexpected situation in __rdiv__ !";
3956         int val;
3957         DataArrayInt *a;
3958         std::vector<int> aa;
3959         DataArrayIntTuple *aaa;
3960         int sw;
3961         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3962         switch(sw)
3963           {
3964           case 1:
3965             {
3966               MCAuto<DataArrayInt> ret=self->deepCopy();
3967               ret->applyInv(val);
3968               return ret.retn();
3969             }
3970           case 2:
3971             {
3972               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3973               return DataArrayInt::Divide(aaaa,self);
3974             }
3975           case 4:
3976             {
3977               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3978               return DataArrayInt::Divide(aaaa,self);
3979             }
3980           default:
3981             throw INTERP_KERNEL::Exception(msg);
3982           }
3983       }
3984
3985       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
3986       {
3987         const char msg[]="Unexpected situation in __idiv__ !";
3988         int val;
3989         DataArrayInt *a;
3990         std::vector<int> aa;
3991         DataArrayIntTuple *aaa;
3992         int sw;
3993         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
3994         switch(sw)
3995           {
3996           case 1:
3997             {
3998               self->applyDivideBy(val);
3999               Py_XINCREF(trueSelf);
4000               return trueSelf;
4001             }
4002           case 2:
4003             {
4004               MCAuto<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
4005               self->divideEqual(bb);
4006               Py_XINCREF(trueSelf);
4007               return trueSelf;
4008             }
4009           case 3:
4010             {
4011               self->divideEqual(a);
4012               Py_XINCREF(trueSelf);
4013               return trueSelf;
4014             }
4015           case 4:
4016             {
4017               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4018               self->divideEqual(aaaa);
4019               Py_XINCREF(trueSelf);
4020               return trueSelf;
4021             }
4022           default:
4023             throw INTERP_KERNEL::Exception(msg);
4024           }
4025       }
4026
4027       DataArrayInt *__mod__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4028       {
4029         const char msg[]="Unexpected situation in __mod__ !";
4030         int val;
4031         DataArrayInt *a;
4032         std::vector<int> aa;
4033         DataArrayIntTuple *aaa;
4034         int sw;
4035         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
4036         switch(sw)
4037           {
4038           case 1:
4039             {
4040               MCAuto<DataArrayInt> ret=self->deepCopy();
4041               ret->applyModulus(val);
4042               return ret.retn();
4043             }
4044           case 2:
4045             {
4046               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
4047               return DataArrayInt::Modulus(self,aaaa);
4048             }
4049           case 3:
4050             {
4051               return DataArrayInt::Modulus(self,a);
4052             }
4053           case 4:
4054             {
4055               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4056               return DataArrayInt::Modulus(self,aaaa);
4057             }
4058           default:
4059             throw INTERP_KERNEL::Exception(msg);
4060           }
4061       }
4062
4063       DataArrayInt *__rmod__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4064       {
4065         const char msg[]="Unexpected situation in __rmod__ !";
4066         int val;
4067         DataArrayInt *a;
4068         std::vector<int> aa;
4069         DataArrayIntTuple *aaa;
4070         int sw;
4071         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
4072         switch(sw)
4073           {
4074           case 1:
4075             {
4076               MCAuto<DataArrayInt> ret=self->deepCopy();
4077               ret->applyRModulus(val);
4078               return ret.retn();
4079             }
4080           case 2:
4081             {
4082               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
4083               return DataArrayInt::Modulus(aaaa,self);
4084             }
4085           case 3:
4086             {
4087               return DataArrayInt::Modulus(a,self);
4088             }
4089           case 4:
4090             {
4091               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4092               return DataArrayInt::Modulus(aaaa,self);
4093             }
4094           default:
4095             throw INTERP_KERNEL::Exception(msg);
4096           }
4097       }
4098
4099       PyObject *___imod___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4100       {
4101         const char msg[]="Unexpected situation in __imod__ !";
4102         int val;
4103         DataArrayInt *a;
4104         std::vector<int> aa;
4105         DataArrayIntTuple *aaa;
4106         int sw;
4107         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
4108         switch(sw)
4109           {
4110           case 1:
4111             {
4112               self->applyModulus(val);
4113               Py_XINCREF(trueSelf);
4114               return trueSelf;
4115             }
4116           case 3:
4117             {
4118               self->modulusEqual(a);
4119               Py_XINCREF(trueSelf);
4120               return trueSelf;
4121             }
4122           case 4:
4123             {
4124               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4125               self->modulusEqual(aaaa);
4126               Py_XINCREF(trueSelf);
4127               return trueSelf;
4128             }
4129           default:
4130             throw INTERP_KERNEL::Exception(msg);
4131           }
4132       }
4133
4134       DataArrayInt *__pow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4135       {
4136         const char msg[]="Unexpected situation in __pow__ !";
4137         int val;
4138         DataArrayInt *a;
4139         std::vector<int> aa;
4140         DataArrayIntTuple *aaa;
4141         int sw;
4142         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
4143         switch(sw)
4144           {
4145           case 1:
4146             {
4147               MCAuto<DataArrayInt> ret=self->deepCopy();
4148               ret->applyPow(val);
4149               return ret.retn();
4150             }
4151           case 2:
4152             {
4153               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
4154               return DataArrayInt::Pow(self,aaaa);
4155             }
4156           case 3:
4157             {
4158               return DataArrayInt::Pow(self,a);
4159             }
4160           case 4:
4161             {
4162               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4163               return DataArrayInt::Pow(self,aaaa);
4164             }
4165           default:
4166             throw INTERP_KERNEL::Exception(msg);
4167           }
4168       }
4169
4170       DataArrayInt *__rpow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4171       {
4172         const char msg[]="Unexpected situation in __rpow__ !";
4173         int val;
4174         DataArrayInt *a;
4175         std::vector<int> aa;
4176         DataArrayIntTuple *aaa;
4177         int sw;
4178         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
4179         switch(sw)
4180           {
4181           case 1:
4182             {
4183               MCAuto<DataArrayInt> ret=self->deepCopy();
4184               ret->applyRPow(val);
4185               return ret.retn();
4186             }
4187           case 2:
4188             {
4189               MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
4190               return DataArrayInt::Pow(aaaa,self);
4191             }
4192           case 3:
4193             {
4194               return DataArrayInt::Pow(a,self);
4195             }
4196           case 4:
4197             {
4198               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4199               return DataArrayInt::Pow(aaaa,self);
4200             }
4201           default:
4202             throw INTERP_KERNEL::Exception(msg);
4203           }
4204       }
4205    
4206       PyObject *___ipow___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4207       {
4208         const char msg[]="Unexpected situation in __ipow__ !";
4209         int val;
4210         DataArrayInt *a;
4211         std::vector<int> aa;
4212         DataArrayIntTuple *aaa;
4213         int sw;
4214         convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
4215         switch(sw)
4216           {
4217           case 1:
4218             {
4219               self->applyPow(val);
4220               Py_XINCREF(trueSelf);
4221               return trueSelf;
4222             }
4223           case 3:
4224             {
4225               self->powEqual(a);
4226               Py_XINCREF(trueSelf);
4227               return trueSelf;
4228             }
4229           case 4:
4230             {
4231               MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4232               self->powEqual(aaaa);
4233               Py_XINCREF(trueSelf);
4234               return trueSelf;
4235             }
4236           default:
4237             throw INTERP_KERNEL::Exception(msg);
4238           }
4239       }
4240
4241       std::string __repr__() const throw(INTERP_KERNEL::Exception)
4242       {
4243         std::ostringstream oss;
4244         self->reprQuickOverview(oss);
4245         return oss.str();
4246       }
4247       
4248       void pushBackValsSilent(PyObject *li) throw(INTERP_KERNEL::Exception)
4249       {
4250         int szArr,sw,iTypppArr;
4251         std::vector<int> stdvecTyyppArr;
4252         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
4253         self->pushBackValsSilent(tmp,tmp+szArr);
4254       }
4255       
4256       PyObject *partitionByDifferentValues() const throw(INTERP_KERNEL::Exception)
4257       {
4258         std::vector<int> ret1;
4259         std::vector<DataArrayInt *> ret0=self->partitionByDifferentValues(ret1);
4260         std::size_t sz=ret0.size();
4261         PyObject *pyRet=PyTuple_New(2);
4262         PyObject *pyRet0=PyList_New((int)sz);
4263         PyObject *pyRet1=PyList_New((int)sz);
4264         for(std::size_t i=0;i<sz;i++)
4265           {
4266             PyList_SetItem(pyRet0,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret0[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
4267             PyList_SetItem(pyRet1,i,PyInt_FromLong(ret1[i]));
4268           }
4269         PyTuple_SetItem(pyRet,0,pyRet0);
4270         PyTuple_SetItem(pyRet,1,pyRet1);
4271         return pyRet;
4272       }
4273       
4274       PyObject *findIdsRangesInListOfIds(const DataArrayInt *listOfIds) const throw(INTERP_KERNEL::Exception)
4275       {
4276         DataArrayInt *ret0=0,*ret1=0;
4277         self->findIdsRangesInListOfIds(listOfIds,ret0,ret1);
4278         PyObject *pyRet=PyTuple_New(2);
4279         PyTuple_SetItem(pyRet,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
4280         PyTuple_SetItem(pyRet,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
4281         return pyRet;
4282       }
4283
4284       PyObject *isRange() const throw(INTERP_KERNEL::Exception)
4285       {
4286         int a(0),b(0),c(0);
4287         bool ret(self->isRange(a,b,c));
4288         PyObject *pyRet=PyTuple_New(2);
4289         PyObject *ret0Py=ret?Py_True:Py_False,*ret1Py(0);
4290         Py_XINCREF(ret0Py);
4291         PyTuple_SetItem(pyRet,0,ret0Py);
4292         if(ret)
4293           ret1Py=PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(c));
4294         else
4295           {
4296             ret1Py=Py_None;
4297             Py_XINCREF(ret1Py);
4298           }
4299         PyTuple_SetItem(pyRet,1,ret1Py);
4300         return pyRet;
4301       }
4302     }
4303   };
4304
4305   class DataArrayIntTuple;
4306
4307   class DataArrayIntIterator
4308   {
4309   public:
4310     DataArrayIntIterator(DataArrayInt *da);
4311     ~DataArrayIntIterator();
4312     %extend
4313     {
4314       PyObject *next()
4315       {
4316         DataArrayIntTuple *ret=self->nextt();
4317         if(ret)
4318           return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayIntTuple,SWIG_POINTER_OWN | 0);
4319         else
4320           {
4321             PyErr_SetString(PyExc_StopIteration,"No more data.");
4322             return 0;
4323           }
4324       }
4325     }
4326   };
4327
4328   class DataArrayIntTuple
4329   {
4330   public:
4331     int getNumberOfCompo() const throw(INTERP_KERNEL::Exception);
4332     DataArrayInt *buildDAInt(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
4333     %extend
4334     {
4335       std::string __str__() const throw(INTERP_KERNEL::Exception)
4336       {
4337         return self->repr();
4338       }
4339
4340       int __int__() const throw(INTERP_KERNEL::Exception)
4341       {
4342         return self->intValue();
4343       }
4344
4345       DataArrayInt *buildDAInt() throw(INTERP_KERNEL::Exception)
4346       {
4347         return self->buildDAInt(1,self->getNumberOfCompo());
4348       }
4349
4350       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4351       {
4352         MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4353         MEDCoupling_DataArrayInt____iadd___(ret,0,obj);
4354         Py_XINCREF(trueSelf);
4355         return trueSelf;
4356       }
4357   
4358       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4359       {
4360         MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4361         MEDCoupling_DataArrayInt____isub___(ret,0,obj);
4362         Py_XINCREF(trueSelf);
4363         return trueSelf;
4364       }
4365   
4366       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4367       {
4368         MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4369         MEDCoupling_DataArrayInt____imul___(ret,0,obj);
4370         Py_XINCREF(trueSelf);
4371         return trueSelf;
4372       }
4373       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4374       {
4375         MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4376         MEDCoupling_DataArrayInt____idiv___(ret,0,obj);
4377         Py_XINCREF(trueSelf);
4378         return trueSelf;
4379       }
4380
4381       PyObject *___imod___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4382       {
4383         MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4384         MEDCoupling_DataArrayInt____imod___(ret,0,obj);
4385         Py_XINCREF(trueSelf);
4386         return trueSelf;
4387       }
4388
4389       PyObject *__len__() throw(INTERP_KERNEL::Exception)
4390       {
4391         return PyInt_FromLong(self->getNumberOfCompo());
4392       }
4393   
4394       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4395       {
4396         const char msg2[]="DataArrayIntTuple::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
4397         int sw;
4398         int singleVal;
4399         std::vector<int> multiVal;
4400         std::pair<int, std::pair<int,int> > slic;
4401         MEDCoupling::DataArrayInt *daIntTyypp=0;
4402         const int *pt=self->getConstPointer();
4403         int nbc=self->getNumberOfCompo();
4404         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
4405         switch(sw)
4406           {
4407           case 1:
4408             {
4409               if(singleVal>=nbc)
4410                 {
4411                   std::ostringstream oss;
4412                   oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
4413                   PyErr_SetString(PyExc_StopIteration,oss.str().c_str());
4414                   return 0;
4415                 }
4416               if(singleVal>=0)
4417                 return PyInt_FromLong(pt[singleVal]);
4418               else
4419                 {
4420                   if(nbc+singleVal>0)
4421                     return PyInt_FromLong(pt[nbc+singleVal]);
4422                   else
4423                     {
4424                       std::ostringstream oss;
4425                       oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
4426                       throw INTERP_KERNEL::Exception(oss.str().c_str());
4427                     }
4428                 }
4429             }
4430           case 2:
4431             {
4432               PyObject *t=PyTuple_New(multiVal.size());
4433               for(int j=0;j<(int)multiVal.size();j++)
4434                 {
4435                   int cid=multiVal[j];
4436                   if(cid>=nbc)
4437                     {
4438                       std::ostringstream oss;
4439                       oss << "Requesting for id #" << cid << " having only " << nbc << " components !";
4440                       throw INTERP_KERNEL::Exception(oss.str().c_str());
4441                     }
4442                   PyTuple_SetItem(t,j,PyInt_FromLong(pt[cid]));
4443                 }
4444               return t;
4445             }
4446           case 3:
4447             {
4448               int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
4449               PyObject *t=PyTuple_New(sz);
4450               for(int j=0;j<sz;j++)
4451                 PyTuple_SetItem(t,j,PyInt_FromLong(pt[slic.first+j*slic.second.second]));
4452               return t;
4453             }
4454           default:
4455             throw INTERP_KERNEL::Exception("DataArrayIntTuple::__getitem__ : unrecognized type entered !");
4456           }
4457       }
4458
4459       DataArrayIntTuple *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
4460       {
4461         const char msg[]="DataArrayIntTuple::__setitem__ : unrecognized type entered, int, slice, list<int>, tuple<int> !";
4462         const char msg2[]="DataArrayIntTuple::__setitem__ : Mismatch of slice values in 2nd parameter (components) !";
4463         int sw1,sw2;
4464         int singleValV;
4465         std::vector<int> multiValV;
4466         std::pair<int, std::pair<int,int> > slicV;
4467         MEDCoupling::DataArrayIntTuple *daIntTyyppV=0;
4468         int nbc=self->getNumberOfCompo();
4469         convertObjToPossibleCpp22(value,nbc,sw1,singleValV,multiValV,slicV,daIntTyyppV);
4470         int singleVal;
4471         std::vector<int> multiVal;
4472         std::pair<int, std::pair<int,int> > slic;
4473         MEDCoupling::DataArrayInt *daIntTyypp=0;
4474         int *pt=self->getPointer();
4475         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
4476         switch(sw2)
4477           {
4478           case 1:
4479             {
4480               if(singleVal>=nbc)
4481                 {
4482                   std::ostringstream oss;
4483                   oss << "Requesting for setting id # " << singleVal << " having only " << nbc << " components !";
4484                   throw INTERP_KERNEL::Exception(oss.str().c_str());
4485                 }
4486               switch(sw1)
4487                 {
4488                 case 1:
4489                   {
4490                     pt[singleVal]=singleValV;
4491                     return self;
4492                   }
4493                 case 2:
4494                   {
4495                     if(multiValV.size()!=1)
4496                       {
4497                         std::ostringstream oss;
4498                         oss << "Requesting for setting id # " << singleVal << " with a list or tuple with size != 1 ! ";
4499                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4500                       }
4501                     pt[singleVal]=multiValV[0];
4502                     return self;
4503                   }
4504                 case 4:
4505                   {
4506                     pt[singleVal]=daIntTyyppV->getConstPointer()[0];
4507                     return self;
4508                   }
4509                 default:
4510                   throw INTERP_KERNEL::Exception(msg);
4511                 }
4512             }
4513           case 2:
4514             {
4515               switch(sw1)
4516                 {
4517                 case 1:
4518                   {
4519                     for(std::vector<int>::const_iterator it=multiVal.begin();it!=multiVal.end();it++)
4520                       {
4521                         if(*it>=nbc)
4522                           {
4523                             std::ostringstream oss;
4524                             oss << "Requesting for setting id # " << *it << " having only " << nbc << " components !";
4525                             throw INTERP_KERNEL::Exception(oss.str().c_str());
4526                           }
4527                         pt[*it]=singleValV;
4528                       }
4529                     return self;
4530                   }
4531                 case 2:
4532                   {
4533                     if(multiVal.size()!=multiValV.size())
4534                       {
4535                         std::ostringstream oss;
4536                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << multiVal.size() << " !";
4537                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4538                       }
4539                     for(int i=0;i<(int)multiVal.size();i++)
4540                       {
4541                         int pos=multiVal[i];
4542                         if(pos>=nbc)
4543                           {
4544                             std::ostringstream oss;
4545                             oss << "Requesting for setting id # " << pos << " having only " << nbc << " components !";
4546                             throw INTERP_KERNEL::Exception(oss.str().c_str());
4547                           }
4548                         pt[multiVal[i]]=multiValV[i];
4549                       }
4550                     return self;
4551                   }
4552                 case 4:
4553                   {
4554                     const int *ptV=daIntTyyppV->getConstPointer();
4555                     if(nbc>daIntTyyppV->getNumberOfCompo())
4556                       {
4557                         std::ostringstream oss;
4558                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
4559                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4560                       }
4561                     std::copy(ptV,ptV+nbc,pt);
4562                     return self;
4563                   }
4564                 default:
4565                   throw INTERP_KERNEL::Exception(msg);
4566                 }
4567             }
4568           case 3:
4569             {
4570               int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
4571               switch(sw1)
4572                 {
4573                 case 1:
4574                   {
4575                     for(int j=0;j<sz;j++)
4576                       pt[slic.first+j*slic.second.second]=singleValV;
4577                     return self;
4578                   }
4579                 case 2:
4580                   {
4581                     if(sz!=(int)multiValV.size())
4582                       {
4583                         std::ostringstream oss;
4584                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << sz << " !";
4585                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4586                       }
4587                     for(int j=0;j<sz;j++)
4588                       pt[slic.first+j*slic.second.second]=multiValV[j];
4589                     return self;
4590                   }
4591                 case 4:
4592                   {
4593                     const int *ptV=daIntTyyppV->getConstPointer();
4594                     if(sz>daIntTyyppV->getNumberOfCompo())
4595                       {
4596                         std::ostringstream oss;
4597                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
4598                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4599                       }
4600                     for(int j=0;j<sz;j++)
4601                       pt[slic.first+j*slic.second.second]=ptV[j];
4602                     return self;
4603                   }
4604                 default:
4605                   throw INTERP_KERNEL::Exception(msg);
4606                 }
4607             }
4608           default:
4609             throw INTERP_KERNEL::Exception(msg);
4610           }
4611       }
4612     }
4613   };
4614
4615   class DataArrayChar : public DataArray
4616   {
4617   public:
4618     virtual DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception);
4619     int getHashCode() const throw(INTERP_KERNEL::Exception);
4620     bool empty() const throw(INTERP_KERNEL::Exception);
4621     void deepCopyFrom(const DataArrayChar& other) throw(INTERP_KERNEL::Exception);
4622     void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception);
4623     void pushBackSilent(char val) throw(INTERP_KERNEL::Exception);
4624     char popBackSilent() throw(INTERP_KERNEL::Exception);
4625     void pack() const throw(INTERP_KERNEL::Exception);
4626     void allocIfNecessary(int nbOfTuple, int nbOfCompo) throw(INTERP_KERNEL::Exception);
4627     bool isEqual(const DataArrayChar& other) const throw(INTERP_KERNEL::Exception);
4628     bool isEqualWithoutConsideringStr(const DataArrayChar& other) const throw(INTERP_KERNEL::Exception);
4629     void reverse() throw(INTERP_KERNEL::Exception);
4630     void fillWithZero() throw(INTERP_KERNEL::Exception);
4631     void fillWithValue(char val) throw(INTERP_KERNEL::Exception);
4632     std::string repr() const throw(INTERP_KERNEL::Exception);
4633     std::string reprZip() const throw(INTERP_KERNEL::Exception);
4634     DataArrayInt *convertToIntArr() const throw(INTERP_KERNEL::Exception);
4635     DataArrayChar *renumber(const int *old2New) const throw(INTERP_KERNEL::Exception);
4636     DataArrayChar *renumberR(const int *new2Old) const throw(INTERP_KERNEL::Exception);
4637     DataArrayChar *renumberAndReduce(const int *old2NewBg, int newNbOfTuple) const throw(INTERP_KERNEL::Exception);
4638     bool isUniform(char val) const throw(INTERP_KERNEL::Exception);
4639     void sort(bool asc=true) throw(INTERP_KERNEL::Exception);
4640     DataArrayChar *subArray(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception);
4641     DataArrayChar *changeNbOfComponents(int newNbOfComp, char dftValue) const throw(INTERP_KERNEL::Exception);
4642     void meldWith(const DataArrayChar *other) throw(INTERP_KERNEL::Exception);
4643     void setPartOfValuesAdv(const DataArrayChar *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception);
4644     char front() const throw(INTERP_KERNEL::Exception);
4645     char back() const throw(INTERP_KERNEL::Exception);
4646     void setIJ(int tupleId, int compoId, char newVal) throw(INTERP_KERNEL::Exception);
4647     void setIJSilent(int tupleId, int compoId, char newVal) throw(INTERP_KERNEL::Exception);
4648     char *getPointer() throw(INTERP_KERNEL::Exception);
4649     DataArrayInt *findIdsEqual(char val) const throw(INTERP_KERNEL::Exception);
4650     DataArrayInt *findIdsNotEqual(char val) const throw(INTERP_KERNEL::Exception);
4651     int findIdFirstEqualTuple(const std::vector<char>& tupl) const throw(INTERP_KERNEL::Exception);
4652     bool presenceOfTuple(const std::vector<char>& tupl) const throw(INTERP_KERNEL::Exception);
4653     char getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
4654     char getMaxValueInArray() const throw(INTERP_KERNEL::Exception);
4655     char getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
4656     char getMinValueInArray() const throw(INTERP_KERNEL::Exception);
4657     DataArrayInt *findIdsInRange(char vmin, char vmax) const throw(INTERP_KERNEL::Exception);
4658     static DataArrayChar *Aggregate(const DataArrayChar *a1, const DataArrayChar *a2) throw(INTERP_KERNEL::Exception);
4659     static DataArrayChar *Meld(const DataArrayChar *a1, const DataArrayChar *a2) throw(INTERP_KERNEL::Exception);
4660     %extend
4661     {
4662       int __len__() const throw(INTERP_KERNEL::Exception)
4663       {
4664         if(self->isAllocated())
4665           {
4666             return self->getNumberOfTuples();
4667           }
4668         else
4669           {
4670             throw INTERP_KERNEL::Exception("DataArrayChar::__len__ : Instance is NOT allocated !");
4671           }
4672       }
4673       
4674       PyObject *isEqualIfNotWhy(const DataArrayChar& other) const throw(INTERP_KERNEL::Exception)
4675       {
4676         std::string ret1;
4677         bool ret0=self->isEqualIfNotWhy(other,ret1);
4678         PyObject *ret=PyTuple_New(2);
4679         PyObject *ret0Py=ret0?Py_True:Py_False;
4680         Py_XINCREF(ret0Py);
4681         PyTuple_SetItem(ret,0,ret0Py);
4682         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
4683         return ret;
4684       }
4685       
4686       DataArrayChar *renumber(PyObject *li) throw(INTERP_KERNEL::Exception)
4687       {
4688         void *da=0;
4689         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
4690         if (!SWIG_IsOK(res1))
4691           {
4692             int size;
4693             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
4694             if(size!=self->getNumberOfTuples())
4695               {
4696                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4697               }
4698             return self->renumber(tmp);
4699           }
4700         else
4701           {
4702             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
4703             if(!da2)
4704               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
4705             da2->checkAllocated();
4706             int size=self->getNumberOfTuples();
4707             if(size!=self->getNumberOfTuples())
4708               {
4709                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4710               }
4711             return self->renumber(da2->getConstPointer());
4712           }
4713       }
4714       
4715       DataArrayChar *renumberR(PyObject *li) throw(INTERP_KERNEL::Exception)
4716       {
4717         void *da=0;
4718         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
4719         if (!SWIG_IsOK(res1))
4720           {
4721             int size;
4722             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
4723             if(size!=self->getNumberOfTuples())
4724               {
4725                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4726               }
4727             return self->renumberR(tmp);
4728           }
4729         else
4730           {
4731             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
4732             if(!da2)
4733               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
4734             da2->checkAllocated();
4735             int size=self->getNumberOfTuples();
4736             if(size!=self->getNumberOfTuples())
4737               {
4738                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4739               }
4740             return self->renumberR(da2->getConstPointer());
4741           }
4742       }
4743       
4744       DataArrayChar *renumberAndReduce(PyObject *li, int newNbOfTuple) throw(INTERP_KERNEL::Exception)
4745       {
4746         void *da=0;
4747         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
4748         if (!SWIG_IsOK(res1))
4749           {
4750             int size;
4751             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
4752             if(size!=self->getNumberOfTuples())
4753               {
4754                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4755               }
4756             return self->renumberAndReduce(tmp,newNbOfTuple);
4757           }
4758         else
4759           {
4760             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
4761             if(!da2)
4762               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
4763             da2->checkAllocated();
4764             int size=self->getNumberOfTuples();
4765             if(size!=self->getNumberOfTuples())
4766               {
4767                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4768               }
4769             return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
4770           }
4771       }
4772       
4773       static DataArrayChar *Aggregate(PyObject *dachs) throw(INTERP_KERNEL::Exception)
4774       {
4775         std::vector<const MEDCoupling::DataArrayChar *> tmp;
4776         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayChar *>(dachs,SWIGTYPE_p_MEDCoupling__DataArrayChar,"DataArrayChar",tmp);
4777         return DataArrayChar::Aggregate(tmp);
4778       }
4779       
4780       static DataArrayChar *Meld(PyObject *dachs) throw(INTERP_KERNEL::Exception)
4781       {
4782         std::vector<const MEDCoupling::DataArrayChar *> tmp;
4783         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayChar *>(dachs,SWIGTYPE_p_MEDCoupling__DataArrayChar,"DataArrayChar",tmp);
4784         return DataArrayChar::Meld(tmp);
4785       }
4786     }
4787   };
4788   
4789   class DataArrayByteIterator;
4790
4791   class DataArrayByte : public DataArrayChar
4792   {
4793   public:
4794     static DataArrayByte *New();
4795     DataArrayByteIterator *iterator() throw(INTERP_KERNEL::Exception);
4796     DataArrayByte *performCopyOrIncrRef(bool deepCopy) const throw(INTERP_KERNEL::Exception);
4797     char byteValue() const throw(INTERP_KERNEL::Exception);
4798     %extend
4799     {
4800       DataArrayByte() throw(INTERP_KERNEL::Exception)
4801         {
4802           return DataArrayByte::New();
4803         }
4804
4805       static DataArrayByte *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
4806       {
4807         const char *msg="MEDCoupling::DataArrayByte::New : Available API are : \n-DataArrayByte.New()\n--DataArrayByte.New([1,3,4])\n-DataArrayByte.New([1,3,4],3)\n-DataArrayByte.New([1,3,4,5],2,2)\n-DataArrayByte.New(5)\n-DataArrayByte.New(5,2) !";
4808         if(PyList_Check(elt0) || PyTuple_Check(elt0))
4809           {
4810             if(nbOfTuples)
4811               {
4812                 if(PyInt_Check(nbOfTuples))
4813                   {
4814                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
4815                     if(nbOfTuples1<0)
4816                       throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive set of allocated memory !");
4817                     if(nbOfComp)
4818                       {
4819                         if(PyInt_Check(nbOfComp))
4820                           {//DataArrayByte.New([1,3,4,5],2,2)
4821                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
4822                             if(nbOfCompo<0)
4823                               throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive number of components !");
4824                             MCAuto<DataArrayByte> ret=DataArrayByte::New();
4825                             std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
4826                             ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
4827                             return ret.retn();
4828                           }
4829                         else
4830                           throw INTERP_KERNEL::Exception(msg);
4831                       }
4832                     else
4833                       {//DataArrayByte.New([1,3,4],3)
4834                         MCAuto<DataArrayByte> ret=DataArrayByte::New();
4835                         int tmpp1=-1;
4836                         std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
4837                         ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
4838                         return ret.retn();
4839                       }
4840                   }
4841                 else
4842                   throw INTERP_KERNEL::Exception(msg);
4843               }
4844             else
4845               {// DataArrayByte.New([1,3,4])
4846                 MCAuto<DataArrayByte> ret=DataArrayByte::New();
4847                 int tmpp1=-1,tmpp2=-1;
4848                 std::vector<int> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
4849                 ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
4850                 return ret.retn();
4851               }
4852           }
4853         else if(PyInt_Check(elt0))
4854           {
4855             int nbOfTuples1=PyInt_AS_LONG(elt0);
4856             if(nbOfTuples1<0)
4857               throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive set of allocated memory !");
4858             if(nbOfTuples)
4859               {
4860                 if(!nbOfComp)
4861                   {
4862                     if(PyInt_Check(nbOfTuples))
4863                       {//DataArrayByte.New(5,2)
4864                         int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
4865                         if(nbOfCompo<0)
4866                           throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive number of components !");
4867                         MCAuto<DataArrayByte> ret=DataArrayByte::New();
4868                         ret->alloc(nbOfTuples1,nbOfCompo);
4869                         return ret.retn();
4870                       }
4871                     else
4872                       throw INTERP_KERNEL::Exception(msg);
4873                   }
4874                 else
4875                   throw INTERP_KERNEL::Exception(msg);
4876               }
4877             else
4878               {//DataArrayByte.New(5)
4879                 MCAuto<DataArrayByte> ret=DataArrayByte::New();
4880                 ret->alloc(nbOfTuples1,1);
4881                 return ret.retn();
4882               }
4883           }
4884 #ifdef WITH_NUMPY
4885         else if(PyArray_Check(elt0) && nbOfTuples==NULL && nbOfComp==NULL)
4886           {//DataArrayDouble.New(numpyArray)
4887             return BuildNewInstance<DataArrayByte,char>(elt0,NPY_INT8,&PyCallBackDataArrayChar_RefType,"INT8");
4888           }
4889 #endif
4890         else
4891           throw INTERP_KERNEL::Exception(msg);
4892       }
4893
4894       DataArrayByte(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
4895         {
4896           return MEDCoupling_DataArrayByte_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
4897         }
4898    
4899       std::string __repr__() const throw(INTERP_KERNEL::Exception)
4900       {
4901         std::ostringstream oss;
4902         self->reprQuickOverview(oss);
4903         return oss.str();
4904       }
4905   
4906       int __int__() const throw(INTERP_KERNEL::Exception)
4907       {
4908         return (int) self->byteValue();
4909       }
4910
4911       DataArrayByteIterator *__iter__() throw(INTERP_KERNEL::Exception)
4912       {
4913         return self->iterator();
4914       }
4915
4916       int getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception)
4917       {
4918         return (int)self->getIJ(tupleId,compoId);
4919       }
4920       
4921       int getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception)
4922       {
4923         return (int)self->getIJSafe(tupleId,compoId);
4924       }
4925
4926       std::string __str__() const throw(INTERP_KERNEL::Exception)
4927       {
4928         return self->repr();
4929       }
4930
4931       PyObject *toStrList() const throw(INTERP_KERNEL::Exception)
4932       {
4933         const char *vals=self->getConstPointer();
4934         int nbOfComp=self->getNumberOfComponents();
4935         int nbOfTuples=self->getNumberOfTuples();
4936         return convertCharArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
4937       }
4938    
4939       bool presenceOfTuple(PyObject *tupl) const throw(INTERP_KERNEL::Exception)
4940       {
4941         int sz=-1,sw=-1;
4942         int ival=-1; std::vector<int> ivval;
4943         const int *pt=convertIntStarLikePyObjToCppIntStar(tupl,sw,sz,ival,ivval);
4944         std::vector<char> vals(sz);
4945         std::copy(pt,pt+sz,vals.begin());
4946         return self->presenceOfTuple(vals);
4947       }
4948
4949       bool presenceOfValue(PyObject *vals) const throw(INTERP_KERNEL::Exception)
4950       {
4951         int sz=-1,sw=-1;
4952         int ival=-1; std::vector<int> ivval;
4953         const int *pt=convertIntStarLikePyObjToCppIntStar(vals,sw,sz,ival,ivval);
4954         std::vector<char> vals2(sz);
4955         std::copy(pt,pt+sz,vals2.begin());
4956         return self->presenceOfValue(vals2);
4957       }
4958
4959       int findIdFirstEqual(PyObject *vals) const throw(INTERP_KERNEL::Exception)
4960       {
4961         int sz=-1,sw=-1;
4962         int ival=-1; std::vector<int> ivval;
4963         const int *pt=convertIntStarLikePyObjToCppIntStar(vals,sw,sz,ival,ivval);
4964         std::vector<char> vals2(sz);
4965         std::copy(pt,pt+sz,vals2.begin());
4966         return self->findIdFirstEqual(vals2);
4967       }
4968
4969       int findIdFirstEqualTuple(PyObject *tupl) const throw(INTERP_KERNEL::Exception)
4970       {
4971         int sz=-1,sw=-1;
4972         int ival=-1; std::vector<int> ivval;
4973         const int *pt=convertIntStarLikePyObjToCppIntStar(tupl,sw,sz,ival,ivval);
4974         std::vector<char> vals(sz);
4975         std::copy(pt,pt+sz,vals.begin());
4976         return self->findIdFirstEqualTuple(vals);
4977       }
4978
4979       int findIdSequence(PyObject *strOrListOfInt) const throw(INTERP_KERNEL::Exception)
4980       {
4981         int sz=-1,sw=-1;
4982         int ival=-1; std::vector<int> ivval;
4983         const int *pt=convertIntStarLikePyObjToCppIntStar(strOrListOfInt,sw,sz,ival,ivval);
4984         std::vector<char> vals(sz);
4985         std::copy(pt,pt+sz,vals.begin());
4986         return self->findIdSequence(vals);
4987       }
4988
4989       PyObject *getTuple(int tupleId) throw(INTERP_KERNEL::Exception)
4990       {
4991         int sz=self->getNumberOfComponents();
4992         INTERP_KERNEL::AutoPtr<char> tmp=new char[sz];
4993         self->getTuple(tupleId,tmp);
4994         PyObject *ret=PyTuple_New(sz);
4995         for(int i=0;i<sz;i++) PyTuple_SetItem(ret,i,PyInt_FromLong((int)tmp[i]));
4996         return ret;
4997       }
4998
4999       PyObject *getMaxValue() const throw(INTERP_KERNEL::Exception)
5000       {
5001         int tmp;
5002         int r1=(int)self->getMaxValue(tmp);
5003         PyObject *ret=PyTuple_New(2);
5004         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
5005         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
5006         return ret;
5007       }
5008
5009       PyObject *getMinValue() const throw(INTERP_KERNEL::Exception)
5010       {
5011         int tmp;
5012         int r1=(int)self->getMinValue(tmp);
5013         PyObject *ret=PyTuple_New(2);
5014         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
5015         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
5016         return ret;
5017       }
5018
5019       int index(PyObject *obj) const throw(INTERP_KERNEL::Exception)
5020       {
5021         int nbOfCompo=self->getNumberOfComponents();
5022         switch(nbOfCompo)
5023           {
5024           case 1:
5025             {
5026               if(PyInt_Check(obj))
5027                 {
5028                   int val=(int)PyInt_AS_LONG(obj);
5029                   return self->findIdFirstEqual(val);
5030                 }
5031               else
5032                 throw INTERP_KERNEL::Exception("DataArrayByte::index : 'this' contains one component and trying to find an element which is not an integer !");
5033             }
5034           default:
5035             return MEDCoupling_DataArrayByte_findIdFirstEqualTuple(self,obj);
5036           }
5037       }
5038
5039       bool __contains__(PyObject *obj) const throw(INTERP_KERNEL::Exception)
5040       {
5041         int nbOfCompo=self->getNumberOfComponents();
5042         switch(nbOfCompo)
5043           {
5044           case 0:
5045             return false;
5046           case 1:
5047             {
5048               if(PyInt_Check(obj))
5049                 {
5050                   int val=(int)PyInt_AS_LONG(obj);
5051                   return self->presenceOfValue(val);
5052                 }
5053               else
5054                 throw INTERP_KERNEL::Exception("DataArrayByte::__contains__ : 'this' contains one component and trying to find an element which is not an integer !");
5055             }
5056           default:
5057             return MEDCoupling_DataArrayByte_presenceOfTuple(self,obj);
5058           }
5059       }
5060       
5061 #ifdef WITH_NUMPY
5062       PyObject *toNumPyArray() throw(INTERP_KERNEL::Exception) // not const. It is not a bug !
5063       {
5064         return ToNumPyArray<DataArrayByte,char>(self,NPY_INT8,"DataArrayByte");
5065       }
5066 #endif
5067
5068       DataArrayByte *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
5069       {
5070         self->checkAllocated();
5071         const char msg[]="Unexpected situation in __setitem__ !";
5072         int nbOfTuples(self->getNumberOfTuples()),nbOfComponents(self->getNumberOfComponents());
5073         int sw1,sw2;
5074         int i1;
5075         std::vector<int> v1;
5076         DataArrayInt *d1=0;
5077         DataArrayIntTuple *dd1=0;
5078         convertIntStarLikePyObjToCpp(value,sw1,i1,v1,d1,dd1);
5079         int it1,ic1;
5080         std::vector<int> vt1,vc1;
5081         std::pair<int, std::pair<int,int> > pt1,pc1;
5082         DataArrayInt *dt1=0,*dc1=0;
5083         convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw2,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
5084         MCAuto<DataArrayInt> tmp;
5085         switch(sw2)
5086           {
5087           case 1:
5088             {
5089               switch(sw1)
5090                 {
5091                 case 1:
5092                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,0,nbOfComponents,1);
5093                   return self;
5094                 default:
5095                   throw INTERP_KERNEL::Exception(msg);
5096                 }
5097               break;
5098             }
5099           case 2:
5100             {
5101               switch(sw1)
5102                 {
5103                 case 1:
5104                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
5105                   return self;
5106                 default:
5107                   throw INTERP_KERNEL::Exception(msg);
5108                 }
5109               break;
5110             }
5111           case 3:
5112             {
5113               switch(sw1)
5114                 {
5115                 case 1:
5116                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
5117                   return self;
5118                 default:
5119                   throw INTERP_KERNEL::Exception(msg);
5120                 }
5121               break;
5122             }
5123           case 4:
5124             {
5125               switch(sw1)
5126                 {
5127                 case 1:
5128                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
5129                   return self;
5130                 default:
5131                   throw INTERP_KERNEL::Exception(msg);
5132                 }
5133               break;
5134             }
5135           case 5:
5136             {
5137               switch(sw1)
5138                 {
5139                 case 1:
5140                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,ic1,ic1+1,1);
5141                   return self;
5142                 default:
5143                   throw INTERP_KERNEL::Exception(msg);
5144                 }
5145               break;
5146             }
5147           case 6:
5148             {
5149               switch(sw1)
5150                 {
5151                 case 1:
5152                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
5153                   return self;
5154                 default:
5155                   throw INTERP_KERNEL::Exception(msg);
5156                 }
5157               break;
5158             }
5159           case 7:
5160             {
5161               switch(sw1)
5162                 {
5163                 case 1:
5164                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
5165                   return self;
5166                 default:
5167                   throw INTERP_KERNEL::Exception(msg);
5168                 }
5169               break;
5170             }
5171           case 8:
5172             {
5173               switch(sw1)
5174                 {
5175                 case 1:
5176                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
5177                   return self;
5178                 default:
5179                   throw INTERP_KERNEL::Exception(msg);
5180                 }
5181               break;
5182             }
5183           case 9:
5184             {
5185               switch(sw1)
5186                 {
5187                 case 1:
5188                   self->setPartOfValuesSimple2(i1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
5189                   return self;
5190                 default:
5191                   throw INTERP_KERNEL::Exception(msg);
5192                 }
5193               break;
5194             }
5195           case 10:
5196             {
5197               switch(sw1)
5198                 {
5199                 case 1:
5200                   self->setPartOfValuesSimple2(i1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
5201                   return self;
5202                 default:
5203                   throw INTERP_KERNEL::Exception(msg);
5204                 }
5205               break;
5206             }
5207           case 11:
5208             {
5209               switch(sw1)
5210                 {
5211                 case 1:
5212                   self->setPartOfValuesSimple4(i1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
5213                   return self;
5214                 default:
5215                   throw INTERP_KERNEL::Exception(msg);
5216                 }
5217               break;
5218             }
5219           case 12:
5220             {
5221               switch(sw1)
5222                 {
5223                 case 1:
5224                   self->setPartOfValuesSimple2(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
5225                   return self;
5226                 default:
5227                   throw INTERP_KERNEL::Exception(msg);
5228                 }
5229               break;
5230             }
5231           case 13:
5232             {
5233               switch(sw1)
5234                 {
5235                 case 1:
5236                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
5237                   return self;
5238                 default:
5239                   throw INTERP_KERNEL::Exception(msg);
5240                 }
5241               break;
5242             }
5243           case 14:
5244             {
5245               switch(sw1)
5246                 {
5247                 case 1:
5248                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
5249                   return self;
5250                 default:
5251                   throw INTERP_KERNEL::Exception(msg);
5252                 }
5253               break;
5254             }
5255           case 15:
5256             {
5257               switch(sw1)
5258                 {
5259                 case 1:
5260                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
5261                   return self;
5262                 default:
5263                   throw INTERP_KERNEL::Exception(msg);
5264                 }
5265               break;
5266             }
5267           case 16:
5268             {
5269               switch(sw1)
5270                 {
5271                 case 1:
5272                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
5273                   return self;
5274                 default:
5275                   throw INTERP_KERNEL::Exception(msg);
5276                 }
5277               break;
5278             }
5279           default:
5280             throw INTERP_KERNEL::Exception(msg);
5281           }
5282         return self;
5283       }
5284     }
5285   };
5286
5287   class DataArrayByteTuple;
5288
5289   class DataArrayByteIterator
5290   {
5291   public:
5292     DataArrayByteIterator(DataArrayByte *da);
5293     ~DataArrayByteIterator();
5294   };
5295
5296   class DataArrayByteTuple
5297   {
5298   public:
5299     std::string repr() const throw(INTERP_KERNEL::Exception);
5300     DataArrayByte *buildDAByte(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
5301     %extend
5302     {
5303       std::string __str__() const throw(INTERP_KERNEL::Exception)
5304       {
5305         return self->repr();
5306       }
5307       
5308       char __int__() const throw(INTERP_KERNEL::Exception)
5309       {
5310         return self->byteValue();
5311       }
5312       
5313       DataArrayByte *buildDAByte() throw(INTERP_KERNEL::Exception)
5314       {
5315         return self->buildDAByte(1,self->getNumberOfCompo());
5316       }
5317     }
5318   };
5319   
5320   class DataArrayAsciiCharIterator;
5321   
5322   class DataArrayAsciiChar : public DataArrayChar
5323   {
5324   public:
5325     static DataArrayAsciiChar *New();
5326     DataArrayAsciiCharIterator *iterator() throw(INTERP_KERNEL::Exception);
5327     DataArrayAsciiChar *performCopyOrIncrRef(bool deepCopy) const throw(INTERP_KERNEL::Exception);
5328     char asciiCharValue() const throw(INTERP_KERNEL::Exception);
5329     %extend
5330     {
5331       DataArrayAsciiChar() throw(INTERP_KERNEL::Exception)
5332         {
5333           return DataArrayAsciiChar::New();
5334         }
5335
5336       static DataArrayAsciiChar *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
5337       {
5338         const char *msg="MEDCoupling::DataArrayAsciiChar::New : Available API are : \n-DataArrayAsciiChar.New()\n-DataArrayAsciiChar.New([1,3,4])\n-DataArrayAsciiChar.New([\"abc\",\"de\",\"fghi\"])\n-DataArrayAsciiChar.New([\"abc\",\"de\",\"fghi\"],\"t\")\n-DataArrayAsciiChar.New([1,3,4],3)\n-DataArrayAsciiChar.New([1,3,4,5],2,2)\n-DataArrayAsciiChar.New(5)\n-DataArrayAsciiChar.New(5,2) !";
5339         if(PyList_Check(elt0) || PyTuple_Check(elt0))
5340           {
5341             if(nbOfTuples)
5342               {
5343                 if(PyInt_Check(nbOfTuples))
5344                   {
5345                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
5346                     if(nbOfTuples1<0)
5347                       throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive set of allocated memory !");
5348                     if(nbOfComp)
5349                       {
5350                         if(PyInt_Check(nbOfComp))
5351                           {//DataArrayAsciiChar.New([1,3,4,5],2,2)
5352                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
5353                             if(nbOfCompo<0)
5354                               throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive number of components !");
5355                             MCAuto<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5356                             std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
5357                             ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
5358                             return ret.retn();
5359                           }
5360                         else
5361                           throw INTERP_KERNEL::Exception(msg);
5362                       }
5363                     else
5364                       {//DataArrayAsciiChar.New([1,3,4],3)
5365                         MCAuto<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5366                         int tmpp1=-1;
5367                         std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
5368                         ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
5369                         return ret.retn();
5370                       }
5371                   }
5372                 else if(PyString_Check(nbOfTuples))
5373                   {
5374                     if(PyString_Size(nbOfTuples)!=1)
5375                       throw INTERP_KERNEL::Exception(msg);
5376                     //DataArrayAsciiChar.New(["abc","de","fghi"],"t")
5377                     std::vector<std::string> tmp;
5378                     if(fillStringVector(elt0,tmp))
5379                       return DataArrayAsciiChar::New(tmp,PyString_AsString(nbOfTuples)[0]);
5380                     else
5381                       throw INTERP_KERNEL::Exception(msg);
5382                   }
5383 %#if PY_VERSION_HEX >= 0x03000000
5384                 else if(PyUnicode_Check(nbOfTuples))
5385                   {
5386                     if(PyUnicode_GET_LENGTH(nbOfTuples)!=1)
5387                       throw INTERP_KERNEL::Exception(msg);
5388                     //DataArrayAsciiChar.New(["abc","de","fghi"],"t")
5389                     std::vector<std::string> tmp;
5390                     if(fillStringVector(elt0,tmp))
5391                       return DataArrayAsciiChar::New(tmp,PyUnicode_AsUTF8(nbOfTuples)[0]);
5392                     else
5393                       throw INTERP_KERNEL::Exception(msg);
5394                   }
5395 %#endif
5396                 else
5397                   throw INTERP_KERNEL::Exception(msg);
5398               }
5399             else
5400               {
5401                 std::vector<std::string> tmmp;
5402                 if(fillStringVector(elt0,tmmp))
5403                   //DataArrayAsciiChar.New(["abc","de","fghi"])
5404                   return DataArrayAsciiChar::New(tmmp,' ');
5405                 else
5406                   {
5407                     // DataArrayAsciiChar.New([1,3,4])
5408                     MCAuto<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5409                     int tmpp1=-1,tmpp2=-1;
5410                     std::vector<int> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
5411                     ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
5412                     return ret.retn();
5413                   }
5414               }
5415           }
5416         else if(PyInt_Check(elt0))
5417           {
5418             int nbOfTuples1=PyInt_AS_LONG(elt0);
5419             if(nbOfTuples1<0)
5420               throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive set of allocated memory !");
5421             if(nbOfTuples)
5422               {
5423                 if(!nbOfComp)
5424                   {
5425                     if(PyInt_Check(nbOfTuples))
5426                       {//DataArrayAsciiChar.New(5,2)
5427                         int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
5428                         if(nbOfCompo<0)
5429                           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive number of components !");
5430                         MCAuto<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5431                         ret->alloc(nbOfTuples1,nbOfCompo);
5432                         return ret.retn();
5433                       }
5434                     else
5435                       throw INTERP_KERNEL::Exception(msg);
5436                   }
5437                 else
5438                   throw INTERP_KERNEL::Exception(msg);
5439               }
5440             else
5441               {//DataArrayAsciiChar.New(5)
5442                 MCAuto<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5443                 ret->alloc(nbOfTuples1,1);
5444                 return ret.retn();
5445               }
5446           }
5447         else
5448           throw INTERP_KERNEL::Exception(msg);
5449       }
5450
5451       DataArrayAsciiChar(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
5452         {
5453           return MEDCoupling_DataArrayAsciiChar_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
5454         }
5455
5456       std::string __repr__() const throw(INTERP_KERNEL::Exception)
5457       {
5458         std::ostringstream oss;
5459         self->reprQuickOverview(oss);
5460         return oss.str();
5461       }
5462
5463       DataArrayAsciiCharIterator *__iter__() throw(INTERP_KERNEL::Exception)
5464       {
5465         return self->iterator();
5466       }
5467
5468       std::string getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception)
5469       {
5470         char tmp[2]; tmp[1]='\0';
5471         tmp[0]=self->getIJ(tupleId,compoId);
5472         return std::string(tmp);
5473       }
5474    
5475       std::string getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception)
5476       {
5477         char tmp[2]; tmp[1]='\0';
5478         tmp[0]=self->getIJSafe(tupleId,compoId);
5479         return std::string(tmp);
5480       }
5481
5482       std::string __str__() const throw(INTERP_KERNEL::Exception)
5483       {
5484         return self->repr();
5485       }
5486
5487       PyObject *toStrList() const throw(INTERP_KERNEL::Exception)
5488       {
5489         const char *vals=self->getConstPointer();
5490         int nbOfComp=self->getNumberOfComponents();
5491         int nbOfTuples=self->getNumberOfTuples();
5492         return convertCharArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
5493       }
5494
5495       bool presenceOfTuple(PyObject *tupl) const throw(INTERP_KERNEL::Exception)
5496       {
5497         if(PyString_Check(tupl))
5498           {
5499             Py_ssize_t sz=PyString_Size(tupl);
5500             std::vector<char> vals(sz);
5501             std::copy(PyString_AsString(tupl),PyString_AsString(tupl)+sz,vals.begin());
5502             return self->presenceOfTuple(vals);
5503           }
5504 %#if PY_VERSION_HEX >= 0x03000000
5505         else if(PyUnicode_Check(tupl))
5506           {
5507             Py_ssize_t sz=PyUnicode_GET_LENGTH(tupl);
5508             std::vector<char> vals(sz);
5509             std::copy(PyUnicode_AsUTF8(tupl),PyUnicode_AsUTF8(tupl)+sz,vals.begin());
5510             return self->presenceOfTuple(vals);
5511           }
5512 %#endif
5513         else
5514           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::presenceOfTuple : only strings in input supported !");
5515       }
5516    
5517       bool presenceOfValue(PyObject *vals) const throw(INTERP_KERNEL::Exception)
5518       {
5519         if(PyString_Check(vals))
5520           {
5521             Py_ssize_t sz=PyString_Size(vals);
5522             std::vector<char> vals2(sz);
5523             std::copy(PyString_AsString(vals),PyString_AsString(vals)+sz,vals2.begin());
5524             return self->presenceOfValue(vals2);
5525           }
5526 %#if PY_VERSION_HEX >= 0x03000000
5527         if(PyUnicode_Check(vals))
5528           {
5529             Py_ssize_t sz=PyUnicode_GET_LENGTH(vals);
5530             std::vector<char> vals2(sz);
5531             std::copy(PyUnicode_AsUTF8(vals),PyUnicode_AsUTF8(vals)+sz,vals2.begin());
5532             return self->presenceOfValue(vals2);
5533           }
5534 %#endif
5535         else
5536           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::presenceOfValue : only strings in input supported !");
5537       }
5538
5539       int findIdFirstEqual(PyObject *vals) const throw(INTERP_KERNEL::Exception)
5540       {
5541         if(PyString_Check(vals))
5542           {
5543             Py_ssize_t sz=PyString_Size(vals);
5544             std::vector<char> vals2(sz);
5545             std::copy(PyString_AsString(vals),PyString_AsString(vals)+sz,vals2.begin());
5546             return self->findIdFirstEqual(vals2);
5547           }
5548 %#if PY_VERSION_HEX >= 0x03000000
5549         if(PyUnicode_Check(vals))
5550           {
5551             Py_ssize_t sz=PyUnicode_GET_LENGTH(vals);
5552             std::vector<char> vals2(sz);
5553             std::copy(PyUnicode_AsUTF8(vals),PyUnicode_AsUTF8(vals)+sz,vals2.begin());
5554             return self->findIdFirstEqual(vals2);
5555           }
5556 %#endif
5557         else
5558           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::findIdFirstEqual : only strings in input supported !");
5559       }
5560
5561       int findIdFirstEqualTuple(PyObject *tupl) const throw(INTERP_KERNEL::Exception)
5562       {
5563         if(PyString_Check(tupl))
5564           {
5565             Py_ssize_t sz=PyString_Size(tupl);
5566             std::vector<char> vals(sz);
5567             std::copy(PyString_AsString(tupl),PyString_AsString(tupl)+sz,vals.begin());
5568             return self->findIdFirstEqualTuple(vals);
5569           }
5570 %#if PY_VERSION_HEX >= 0x03000000
5571         if(PyUnicode_Check(tupl))
5572           {
5573             Py_ssize_t sz=PyUnicode_GET_LENGTH(tupl);
5574             std::vector<char> vals(sz);
5575             std::copy(PyUnicode_AsUTF8(tupl),PyUnicode_AsUTF8(tupl)+sz,vals.begin());
5576             return self->findIdFirstEqualTuple(vals);
5577           }
5578 %#endif
5579         else
5580           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::findIdFirstEqualTuple : only strings in input supported !");
5581       }
5582
5583       int findIdSequence(PyObject *strOrListOfInt) const throw(INTERP_KERNEL::Exception)
5584       {
5585         if(PyString_Check(strOrListOfInt))
5586           {
5587             Py_ssize_t sz=PyString_Size(strOrListOfInt);
5588             std::vector<char> vals(sz);
5589             std::copy(PyString_AsString(strOrListOfInt),PyString_AsString(strOrListOfInt)+sz,vals.begin());
5590             return self->findIdSequence(vals);
5591           }
5592 %#if PY_VERSION_HEX >= 0x03000000
5593         else if(PyUnicode_Check(strOrListOfInt))
5594           {
5595             Py_ssize_t sz=PyUnicode_GET_LENGTH(strOrListOfInt);
5596             std::vector<char> vals(sz);
5597             std::copy(PyUnicode_AsUTF8(strOrListOfInt),PyUnicode_AsUTF8(strOrListOfInt)+sz,vals.begin());
5598             return self->findIdSequence(vals);
5599           }
5600 %#endif
5601         else
5602           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::search : only strings in input supported !");
5603       }
5604    
5605       PyObject *getTuple(int tupleId) const throw(INTERP_KERNEL::Exception)
5606       {
5607         int sz=self->getNumberOfComponents();
5608         INTERP_KERNEL::AutoPtr<char> tmp=new char[sz+1]; tmp[sz]='\0';
5609         self->getTuple(tupleId,tmp);
5610         return PyString_FromString(tmp);
5611       }
5612
5613       PyObject *getMaxValue() const throw(INTERP_KERNEL::Exception)
5614       {
5615         int tmp;
5616         char tmp2[2]; tmp2[1]='\0';
5617         tmp2[0]=self->getMaxValue(tmp);
5618         PyObject *ret=PyTuple_New(2);
5619         PyTuple_SetItem(ret,0,PyString_FromString(tmp2));
5620         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
5621         return ret;
5622       }
5623
5624       PyObject *getMinValue() const throw(INTERP_KERNEL::Exception)
5625       {
5626         int tmp;
5627         char tmp2[2]; tmp2[1]='\0';
5628         tmp2[0]=self->getMinValue(tmp);
5629         PyObject *ret=PyTuple_New(2);
5630         PyTuple_SetItem(ret,0,PyString_FromString(tmp2));
5631         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
5632         return ret;
5633       }
5634
5635       int index(PyObject *obj) const throw(INTERP_KERNEL::Exception)
5636       {
5637         int nbOfCompo=self->getNumberOfComponents();
5638         switch(nbOfCompo)
5639           {
5640           case 1:
5641             {
5642               if(PyString_Check(obj))
5643                 {
5644                   Py_ssize_t sz=PyString_Size(obj);
5645                   char *pt=PyString_AsString(obj);
5646                   if(sz==1)
5647                     return self->findIdFirstEqual(pt[0]);
5648                   else
5649                     throw INTERP_KERNEL::Exception("DataArrayAsciiChar::index : 'this' contains one component and trying to find a string with size different from 1 !");
5650                 }
5651 %#if PY_VERSION_HEX >= 0x03000000
5652               if(PyUnicode_Check(obj))
5653                 {
5654                   Py_ssize_t sz;
5655                   char *pt=PyUnicode_AsUTF8AndSize(obj, &sz);
5656                   if(sz==1)
5657                     return self->findIdFirstEqual(pt[0]);
5658                   else
5659                     throw INTERP_KERNEL::Exception("DataArrayAsciiChar::index : 'this' contains one component and trying to find a string with size different from 1 !");
5660                 }
5661 %#endif
5662               else
5663                 throw INTERP_KERNEL::Exception("DataArrayAsciiChar::index : 'this' contains one component and trying to find an element which is not an integer !");
5664             }
5665           default:
5666             return MEDCoupling_DataArrayAsciiChar_findIdFirstEqualTuple(self,obj);
5667           }
5668       }
5669
5670       bool __contains__(PyObject *obj) const throw(INTERP_KERNEL::Exception)
5671       {
5672         int nbOfCompo=self->getNumberOfComponents();
5673         switch(nbOfCompo)
5674           {
5675           case 0:
5676             return false;
5677           case 1:
5678             {
5679               if(PyString_Check(obj))
5680                 {
5681                   Py_ssize_t sz=PyString_Size(obj);
5682                   char *pt=PyString_AsString(obj);
5683                   if(sz==1)
5684                     return self->presenceOfValue(pt[0]);
5685                   else
5686                     throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__contains__ : 'this' contains one component and trying to find a string with size different from 1 !");
5687                 }
5688 %#if PY_VERSION_HEX >= 0x03000000
5689               if(PyUnicode_Check(obj))
5690                 {
5691                   Py_ssize_t sz;
5692                   char *pt=PyUnicode_AsUTF8AndSize(obj, &sz);
5693                   if(sz==1)
5694                     return self->presenceOfValue(pt[0]);
5695                   else
5696                     throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__contains__ : 'this' contains one component and trying to find a string with size different from 1 !");
5697                 }
5698 %#endif
5699               else
5700                 throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__contains__ : 'this' contains one component and trying to find an element which is not an integer !");
5701             }
5702           default:
5703             return MEDCoupling_DataArrayAsciiChar_presenceOfTuple(self,obj);
5704           }
5705       }
5706
5707       PyObject *__getitem__(PyObject *obj) const throw(INTERP_KERNEL::Exception)
5708       {
5709         int sw,iTypppArr;
5710         std::vector<int> stdvecTyyppArr;
5711         std::pair<int, std::pair<int,int> > sTyyppArr;
5712         MEDCoupling::DataArrayInt *daIntTyypp=0;
5713         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,self->getNumberOfTuples(),sw,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
5714         switch(sw)
5715           {
5716           case 1:
5717             return MEDCoupling_DataArrayAsciiChar_getTuple(self,iTypppArr);
5718           case 2:
5719             return convertDataArrayChar(self->selectByTupleIdSafe(&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size()), SWIG_POINTER_OWN | 0 );
5720           case 3:
5721             return convertDataArrayChar(self->selectByTupleIdSafeSlice(sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second), SWIG_POINTER_OWN | 0 );
5722           case 4:
5723             return convertDataArrayChar(self->selectByTupleIdSafe(daIntTyypp->begin(),daIntTyypp->end()), SWIG_POINTER_OWN | 0 );
5724           default:
5725             throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__getitem__ : supporting int, list of int, tuple of int, DataArrayInt and slice in input !");
5726           }
5727       }
5728
5729       DataArrayAsciiChar *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
5730       {
5731         static const char msg[]="DataArrayAsciiChar::__setitem__ : supporting int, list of int, tuple of int, DataArrayInt and slice in input, and 4 types accepted in value : string, list or tuple of strings having same size, not null DataArrayChar instance.";
5732         int sw1,iTypppArr;
5733         std::vector<int> stdvecTyyppArr;
5734         std::pair<int, std::pair<int,int> > sTyyppArr;
5735         MEDCoupling::DataArrayInt *daIntTyypp=0;
5736         int nbOfCompo=self->getNumberOfComponents();
5737         int nbOfTuples=self->getNumberOfTuples();
5738         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbOfTuples,sw1,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
5739         int sw2;
5740         char vc; std::string sc; std::vector<std::string> vsc; DataArrayChar *dacc=0;
5741         convertObjToPossibleCpp6(value,sw2,vc,sc,vsc,dacc);
5742         switch(sw1)
5743           {
5744           case 1:
5745             {//obj int
5746               switch(sw2)
5747                 {//value char
5748                 case 1:
5749                   {
5750                     self->setPartOfValuesSimple3(vc,&iTypppArr,&iTypppArr+1,0,nbOfCompo,1);
5751                     return self;
5752                   }
5753                   //value string
5754                 case 2:
5755                   {
5756                     MCAuto<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(sc);
5757                     self->setPartOfValues3(tmp,&iTypppArr,&iTypppArr+1,0,nbOfCompo,1,false);
5758                     return self;
5759                   }
5760                   //value vector<string>
5761                 case 3:
5762                   {
5763                     MCAuto<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(vsc,' ');
5764                     self->setPartOfValues3(tmp,&iTypppArr,&iTypppArr+1,0,nbOfCompo,1,false);
5765                     return self;
5766                   }
5767                   //value DataArrayChar
5768                 case 4:
5769                   {
5770                     self->setPartOfValues3(dacc,&iTypppArr,&iTypppArr+1,0,nbOfCompo,1,false);
5771                     return self;
5772                   }
5773                 default:
5774                   throw INTERP_KERNEL::Exception(msg);
5775                 }
5776             }
5777           case 2:
5778             {//obj list-tuple[int]
5779               switch(sw2)
5780                 {
5781                   {//value char
5782                   case 1:
5783                     {
5784                       self->setPartOfValuesSimple3(vc,&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size(),0,nbOfCompo,1);
5785                       return self;
5786                     }
5787                     //value string
5788                   case 2:
5789                     {
5790                       MCAuto<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(sc);
5791                       self->setPartOfValues3(tmp,&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size(),0,nbOfCompo,1,false);
5792                       return self;
5793                     }
5794                     //value vector<string>
5795                   case 3:
5796                     {
5797                       MCAuto<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(vsc,' ');
5798                       self->setPartOfValues3(tmp,&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size(),0,nbOfCompo,1,false);
5799                       return self;
5800                     }
5801                     //value DataArrayChar
5802                   case 4:
5803                     {
5804                       self->setPartOfValues3(dacc,&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size(),0,nbOfCompo,1,false);
5805                       return self;
5806                     }
5807                   default:
5808                     throw INTERP_KERNEL::Exception(msg);
5809                   }
5810                 }
5811             }
5812           case 3:
5813             {//slice
5814               switch(sw2)
5815                 {
5816                   {//value char
5817                   case 1:
5818                     {
5819                       self->setPartOfValuesSimple1(vc,sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second,0,nbOfCompo,1);
5820                       return self;
5821                     }
5822                     //value string
5823                   case 2:
5824                     {
5825                       MCAuto<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(sc);
5826                       self->setPartOfValues1(tmp,sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second,0,nbOfCompo,1,false);
5827                       return self;
5828                     }
5829                     //value vector<string>
5830                   case 3:
5831                     {
5832                       MCAuto<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(vsc,' ');
5833                       self->setPartOfValues1(tmp,sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second,0,nbOfCompo,1,false);
5834                       return self;
5835                     }
5836                     //value DataArrayChar
5837                   case 4:
5838                     {
5839                       self->setPartOfValues1(dacc,sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second,0,nbOfCompo,1,false);
5840                       return self;
5841                     }
5842                   default:
5843                     throw INTERP_KERNEL::Exception(msg);
5844                   }
5845                 }
5846             }
5847           case 4:
5848             {//DataArrayInt
5849               switch(sw2)
5850                 {
5851                   {//value char
5852                   case 1:
5853                     {
5854                       self->setPartOfValuesSimple3(vc,daIntTyypp->begin(),daIntTyypp->end(),0,nbOfCompo,1);
5855                       return self;
5856                     }
5857                     //value string
5858                   case 2:
5859                     {
5860                       MCAuto<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(sc);
5861                       self->setPartOfValues3(tmp,daIntTyypp->begin(),daIntTyypp->end(),0,nbOfCompo,1,false);
5862                       return self;
5863                     }
5864                     //value vector<string>
5865                   case 3:
5866                     {
5867                       MCAuto<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(vsc,' ');
5868                       self->setPartOfValues3(tmp,daIntTyypp->begin(),daIntTyypp->end(),0,nbOfCompo,1,false);
5869                       return self;
5870                     }
5871                     //value DataArrayChar
5872                   case 4:
5873                     {
5874                       self->setPartOfValues3(dacc,daIntTyypp->begin(),daIntTyypp->end(),0,nbOfCompo,1,false);
5875                       return self;
5876                     }
5877                   default:
5878                     throw INTERP_KERNEL::Exception(msg);
5879                   }
5880                 }
5881             }
5882           default:
5883             throw INTERP_KERNEL::Exception(msg);
5884           }
5885       }
5886     }
5887   };
5888
5889   class DataArrayAsciiCharTuple;
5890
5891   class DataArrayAsciiCharIterator
5892   {
5893   public:
5894     DataArrayAsciiCharIterator(DataArrayAsciiChar *da);
5895     ~DataArrayAsciiCharIterator();
5896     %extend
5897     {
5898       PyObject *next()
5899       {
5900         DataArrayAsciiCharTuple *ret=self->nextt();
5901         if(ret)
5902           return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayAsciiCharTuple,SWIG_POINTER_OWN | 0);
5903         else
5904           {
5905             PyErr_SetString(PyExc_StopIteration,"No more data.");
5906             return 0;
5907           }
5908       }
5909     }
5910   };
5911
5912   class DataArrayAsciiCharTuple
5913   {
5914   public:
5915     int getNumberOfCompo() const throw(INTERP_KERNEL::Exception);
5916     DataArrayAsciiChar *buildDAAsciiChar(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
5917     %extend
5918     {
5919       std::string __str__() const throw(INTERP_KERNEL::Exception)
5920       {
5921         return self->repr();
5922       }
5923       
5924       DataArrayAsciiChar *buildDAAsciiChar() throw(INTERP_KERNEL::Exception)
5925       {
5926         return self->buildDAAsciiChar(1,self->getNumberOfCompo());
5927       }
5928     }
5929   };
5930 }
5931
5932 %pythoncode %{
5933 def MEDCouplingStdReduceFunct(cls,params):
5934     a,b=params
5935     ret=object.__new__(cls)
5936     ret.__init__(*a)
5937     ret.__setstate__(b)
5938     return ret
5939
5940 def MEDCouplingDataArrayDoubleReduce(self):
5941     if not MEDCouplingHasNumPyBindings():
5942       raise InterpKernelException("PyWrap of DataArrayDouble.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
5943     return MEDCouplingStdReduceFunct,(DataArrayDouble,((self.toNumPyArray(),),(self.__getstate__()),))
5944
5945 def MEDCouplingDataArrayIntReduce(self):
5946     if not MEDCouplingHasNumPyBindings():
5947       raise InterpKernelException("PyWrap of DataArrayInt.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
5948     return MEDCouplingStdReduceFunct,(DataArrayInt,((self.toNumPyArray(),),(self.__getstate__()),))
5949
5950 def MEDCouplingDataArrayByteReduce(self):
5951     if not MEDCouplingHasNumPyBindings():
5952       raise InterpKernelException("PyWrap of DataArrayByte.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
5953     return MEDCouplingStdReduceFunct,(DataArrayByte,((self.toNumPyArray(),),(self.__getstate__()),))
5954
5955 def MEDCouplingDataArrayFloatReduce(self):
5956     if not MEDCouplingHasNumPyBindings():
5957       raise InterpKernelException("PyWrap of DataArrayFloat.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
5958     return MEDCouplingStdReduceFunct,(DataArrayFloat,((self.toNumPyArray(),),(self.__getstate__()),))
5959 %}