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