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