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