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