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