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