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