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