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