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