Compilation and tests OK with Python 2.7.
Python 3: unicode todo
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCoupling import *
import unittest
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCoupling import *
import unittest
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCoupling import *
import unittest
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCoupling import *
import unittest
pass
expected1=[-0.9,1.3,1.7,2.1,3.,3.]
for i in range(6):
- self.assertAlmostEqual(expected1[i],res[i/2][i%2],14)
+ self.assertAlmostEqual(expected1[i], res[i // 2][i % 2], 14)
pass
#
d1.rearrange(2);
pass
expected2=[1.,3.,-0.9,3.]
for i in range(4):
- self.assertAlmostEqual(expected2[i],res[i/2][i%2],14)
+ self.assertAlmostEqual(expected2[i], res[i // 2][i % 2], 14)
pass
#
d1.rearrange(1);
pass
expected3=[-0.9,3.]
for i in range(2):
- self.assertAlmostEqual(expected3[i],res[i/2][i%2],14)
+ self.assertAlmostEqual(expected3[i], res[i // 2][i % 2], 14)
pass
pass
baseMesh = MEDCouplingUMesh.New("box_circle", 2)
baseMesh.allocateCells(2)
- meshCoords = DataArrayDouble.New(coords, len(coords)/2, 2)
+ meshCoords = DataArrayDouble.New(coords, len(coords) // 2, 2)
meshCoords.setInfoOnComponents(["X [au]", "Y [au]"])
baseMesh.setCoords(meshCoords)
connec = list(range(4))
m1 = MEDCouplingUMesh.New("box", 2)
m1.allocateCells(1)
- meshCoords = DataArrayDouble.New(coords, len(coords)/2, 2)
+ meshCoords = DataArrayDouble.New(coords, len(coords) // 2, 2)
m1.setCoords(meshCoords)
m1.insertNextCell(NORM_POLYGON, connec)
m1.finishInsertingCells()
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCoupling import *
import unittest
conn = [5,5,2,6,4,5,6,3,0,1,5,4,5,10,8,11,9,5,11,2,1,7,10,9]
connI = [0,5,12,17,24]
m = MEDCouplingUMesh("box",2)
- cooArr = DataArrayDouble(coo,len(coo)/2,2)
+ cooArr = DataArrayDouble(coo,len(coo)//2,2)
m.setCoords(cooArr)
m.setConnectivity(DataArrayInt(conn),DataArrayInt(connI))
m.mergeNodes(eps)
connec = [0,1]
m_line = MEDCouplingUMesh("seg", 1)
m_line.allocateCells(1)
- meshCoords = DataArrayDouble.New(coords, len(coords)/2, 2)
+ meshCoords = DataArrayDouble.New(coords, len(coords)//2, 2)
m_line.setCoords(meshCoords)
m_line.insertNextCell(NORM_SEG2, connec)
a, b, c, d = MEDCouplingUMesh.Intersect2DMeshWith1DLine(m_circ, m_line, eps)
coords2 = [0., 1.3, -1.3, 0., -0.6, 0.6, 0., -1.3, -0.5, -0.5]
connec2, cI2 = [NORM_SEG3, 0, 1, 2, NORM_SEG3, 1, 3, 4], [0,4,8]
m_line = MEDCouplingUMesh("seg", 1)
- m_line.setCoords(DataArrayDouble(coords2, len(coords2)/2, 2))
+ m_line.setCoords(DataArrayDouble(coords2, len(coords2)//2, 2))
m_line.setConnectivity(DataArrayInt(connec2), DataArrayInt(cI2))
a, b, c, d = MEDCouplingUMesh.Intersect2DMeshWith1DLine(m, m_line, eps)
self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
coords2 = [-1., 0.25, 1., 0.25]
connec2, cI2 = [NORM_SEG2, 0, 1], [0,3]
m_line = MEDCouplingUMesh.New("seg", 1)
- m_line.setCoords(DataArrayDouble(coords2, len(coords2)/2, 2))
+ m_line.setCoords(DataArrayDouble(coords2, len(coords2)//2, 2))
m_line.setConnectivity(DataArrayInt(connec2), DataArrayInt(cI2))
m_line2 = m_line.deepCopy()
m2 = m.deepCopy()
coords2 = [-2., 1., 2., 1.0]
connec2, cI2 = [NORM_SEG2, 0, 1], [0,3]
m_line = MEDCouplingUMesh("seg", 1)
- m_line.setCoords(DataArrayDouble(coords2, len(coords2)/2, 2))
+ m_line.setCoords(DataArrayDouble(coords2, len(coords2)//2, 2))
m_line.setConnectivity(DataArrayInt(connec2), DataArrayInt(cI2))
a, b, c, d = MEDCouplingUMesh.Intersect2DMeshWith1DLine(m, m_line, eps)
self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
coords2 = [-2., 0., 2., 0.]
connec2, cI2 = [NORM_SEG2, 0, 1], [0,3]
m_line = MEDCouplingUMesh.New("seg", 1)
- m_line.setCoords(DataArrayDouble(coords2, len(coords2)/2, 2))
+ m_line.setCoords(DataArrayDouble(coords2, len(coords2)//2, 2))
m_line.setConnectivity(DataArrayInt(connec2), DataArrayInt(cI2))
a, b, c, d = MEDCouplingUMesh.Intersect2DMeshWith1DLine(m, m_line, eps)
self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
coords2 = [1., 2., 1., -2.]
connec2, cI2 = [NORM_SEG2, 0, 1], [0,3]
m_line = MEDCouplingUMesh("seg", 1)
- m_line.setCoords(DataArrayDouble(coords2, len(coords2)/2, 2))
+ m_line.setCoords(DataArrayDouble(coords2, len(coords2)//2, 2))
m_line.setConnectivity(DataArrayInt(connec2), DataArrayInt(cI2))
a, b, c, d = MEDCouplingUMesh.Intersect2DMeshWith1DLine(m, m_line, eps)
self.assertTrue(a.getCoords().getHiddenCppPointer()==b.getCoords().getHiddenCppPointer())
%newobject MEDCoupling::MEDCouplingFieldDouble::__add__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__sub__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__mul__;
-#ifdef USE_PYTHON3
-%newobject MEDCoupling::MEDCouplingFieldDouble::__truediv__;
-#else
%newobject MEDCoupling::MEDCouplingFieldDouble::__div__;
-#endif
%newobject MEDCoupling::MEDCouplingFieldDouble::__pow__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__radd__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__rsub__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__rmul__;
-#ifdef USE_PYTHON3
-%newobject MEDCoupling::MEDCouplingFieldDouble::__rtruediv__;
-#else
%newobject MEDCoupling::MEDCouplingFieldDouble::__rdiv__;
-#endif
%newobject MEDCoupling::MEDCouplingFieldDouble::clone;
%newobject MEDCoupling::MEDCouplingFieldDouble::cloneWithMesh;
%newobject MEDCoupling::MEDCouplingFieldDouble::deepCopy;
return MEDCoupling_MEDCouplingFieldDouble___rmul__Impl(self,obj);
}
-#ifdef USE_PYTHON3
- MEDCouplingFieldDouble *__truediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
MEDCouplingFieldDouble *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__div__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
const char msg2[]="in MEDCouplingFieldDouble.__div__ : self field has no Array of values set !";
}
}
-#ifdef USE_PYTHON3
- MEDCouplingFieldDouble *__rtruediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
MEDCouplingFieldDouble *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
return MEDCoupling_MEDCouplingFieldDouble___rdiv__Impl(self,obj);
}
}
}
-#ifdef USE_PYTHON3
- PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__idiv__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
const char msg2[]="in MEDCouplingFieldDouble.__idiv__ : self field has no Array of values set !";
return;
}
}
+#ifdef USE_PYTHON3
+ if(PyUnicode_Check(value))
+ {
+ Py_ssize_t sz; // =PyString_Size(value);
+ const char *pt = PyUnicode_AsUTF8AndSize(value, &sz);
+ if(sz==1)
+ {
+ cTyp=pt[0];
+ sw=1;
+ return;
+ }
+ else
+ {
+ sType=pt;
+ sw=2;
+ return;
+ }
+ }
+#endif
if(PyTuple_Check(value))
{
int size=PyTuple_Size(value);
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCoupling import *
from six.moves import range
fff.setGaussLocalizationOnCells([6,7],[-1.,-1.,-1.,-1.,1.,-1.,1.,1.,-1.,1.,-1.,-1.,-1.,-1.,1.,-1.,1.,1.,1.,1.,1.,1.,-1.,1.],[-0.577350269189626,-0.577350269189626,-0.577350269189626,-0.577350269189626,-0.577350269189626,0.577350269189626,-0.577350269189626,0.577350269189626,-0.577350269189626,-0.577350269189626,0.577350269189626,0.577350269189626,0.577350269189626,-0.577350269189626,-0.577350269189626,0.577350269189626,-0.577350269189626,0.577350269189626,0.577350269189626,0.577350269189626,-0.577350269189626,0.577350269189626,0.577350269189626,0.577350269189626],[1.,1.,1.,1.,1.,1.,1.,1.])
return MEDCouplingFieldTemplate(fff)
- def buildCircle(self, center_X, center_Y, radius):
+ def buildCircle(self, center_X, center_Y, radius):
from cmath import rect
from math import pi
connec = list(range(4))
baseMesh = MEDCouplingUMesh.New("circle", 2)
baseMesh.allocateCells(1)
- meshCoords = DataArrayDouble.New(coords, len(coords)/2, 2)
+ meshCoords = DataArrayDouble.New(coords, len(coords) // 2, 2)
meshCoords += (center_X, center_Y)
baseMesh.setCoords(meshCoords)
connec = [7,5,3,1, 6,4,2,0]
baseMesh = MEDCouplingUMesh.New("circle", 2)
baseMesh.allocateCells(1)
- meshCoords = DataArrayDouble.New(coords, len(coords)/2, 2)
+ meshCoords = DataArrayDouble.New(coords, len(coords) // 2, 2)
meshCoords += (center_X, center_Y)
baseMesh.setCoords(meshCoords)
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCoupling import *
import unittest
DataArrayDouble.__imul__=MEDCouplingDataArrayDoubleImul
DataArrayDouble.__idiv__=MEDCouplingDataArrayDoubleIdiv
DataArrayDouble.__ipow__=MEDCouplingDataArrayDoubleIpow
+DataArrayDouble.__truediv__=DataArrayDouble.__div__
+DataArrayDouble.__itruediv__=MEDCouplingDataArrayDoubleIdiv
+DataArrayDouble.__rtruediv__=DataArrayDouble.__rdiv__
+DataArrayDouble.__floordiv__=DataArrayDouble.__div__
+DataArrayDouble.__ifloordiv__=MEDCouplingDataArrayDoubleIdiv
+DataArrayDouble.__rfloordiv__=DataArrayDouble.__rdiv__
DataArrayInt.__new__=classmethod(MEDCouplingDataArrayIntnew)
DataArrayInt.__iadd__=MEDCouplingDataArrayIntIadd
DataArrayInt.__idiv__=MEDCouplingDataArrayIntIdiv
DataArrayInt.__imod__=MEDCouplingDataArrayIntImod
DataArrayInt.__ipow__=MEDCouplingDataArrayIntIpow
+DataArrayInt.__truediv__=DataArrayInt.__div__
+DataArrayInt.__itruediv__=MEDCouplingDataArrayIntIdiv
+DataArrayInt.__rtruediv__=DataArrayInt.__rdiv__
+DataArrayInt.__floordiv__=DataArrayInt.__div__
+DataArrayInt.__ifloordiv__=MEDCouplingDataArrayIntIdiv
+DataArrayInt.__rfloordiv__=DataArrayInt.__rdiv__
DataArrayByte.__new__=classmethod(MEDCouplingDataArrayBytenew)
MEDCouplingFieldDouble.__imul__=MEDCouplingFieldDoubleImul
MEDCouplingFieldDouble.__idiv__=MEDCouplingFieldDoubleIdiv
MEDCouplingFieldDouble.__ipow__=MEDCouplingFieldDoubleIpow
+MEDCouplingFieldDouble.__truediv__=MEDCouplingFieldDouble.__div__
+MEDCouplingFieldDouble.__rtruediv__=MEDCouplingFieldDouble.__rdiv__
+MEDCouplingFieldDouble.__itruediv__=MEDCouplingFieldDoubleIdiv
+MEDCouplingFieldDouble.__floordiv__=MEDCouplingFieldDouble.__div__
+MEDCouplingFieldDouble.__rfloordiv__=MEDCouplingFieldDouble.__rdiv__
+MEDCouplingFieldDouble.__ifloordiv__=MEDCouplingFieldDoubleIdiv
DataArrayDoubleTuple.__iadd__=MEDCouplingDataArrayDoubleTupleIadd
DataArrayDoubleTuple.__isub__=MEDCouplingDataArrayDoubleTupleIsub
DataArrayDoubleTuple.__imul__=MEDCouplingDataArrayDoubleTupleImul
DataArrayDoubleTuple.__idiv__=MEDCouplingDataArrayDoubleTupleIdiv
+DataArrayDoubleTuple.__itruediv__=MEDCouplingDataArrayDoubleTupleIdiv
+DataArrayDoubleTuple.__ifloordiv__=MEDCouplingDataArrayDoubleTupleIdiv
DataArrayIntTuple.__iadd__=MEDCouplingDataArrayIntTupleIadd
DataArrayIntTuple.__isub__=MEDCouplingDataArrayIntTupleIsub
DataArrayIntTuple.__imul__=MEDCouplingDataArrayIntTupleImul
DataArrayIntTuple.__idiv__=MEDCouplingDataArrayIntTupleIdiv
+DataArrayIntTuple.__itruediv__=MEDCouplingDataArrayIntTupleIdiv
+DataArrayIntTuple.__ifloordiv__=MEDCouplingDataArrayIntTupleIdiv
DataArrayIntTuple.__imod__=MEDCouplingDataArrayIntTupleImod
DenseMatrix.__iadd__=ParaMEDMEMDenseMatrixIadd
MEDCouplingMappedExtrudedMesh.__new__=classmethod(MEDCouplingExtrudedMeshnew)
MEDCouplingFieldDouble.__new__=classmethod(MEDCouplingFieldDoublenew)
+DataArrayAsciiCharIterator.__next__ = DataArrayAsciiCharIterator.next
+DataArrayIntIterator.__next__ = DataArrayIntIterator.next
+DataArrayDoubleIterator.__next__ = DataArrayDoubleIterator.next
+MEDCouplingUMeshCellIterator.__next__ = MEDCouplingUMeshCellIterator.next
+MEDCouplingUMeshCellByTypeIterator.__next__ = MEDCouplingUMeshCellByTypeIterator.next
+
del INTERPKERNELExceptionReduce
del MEDCouplingDataArrayDoublenew
del MEDCouplingDataArrayDoubleIadd
%newobject MEDCoupling::DataArrayInt::__rsub__;
%newobject MEDCoupling::DataArrayInt::__mul__;
%newobject MEDCoupling::DataArrayInt::__rmul__;
-#ifdef USE_PYTHON3
-%newobject MEDCoupling::DataArrayInt::__truediv__;
-%newobject MEDCoupling::DataArrayInt::__rtruediv__;
-#else
%newobject MEDCoupling::DataArrayInt::__div__;
%newobject MEDCoupling::DataArrayInt::__rdiv__;
-#endif
%newobject MEDCoupling::DataArrayInt::__mod__;
%newobject MEDCoupling::DataArrayInt::__rmod__;
%newobject MEDCoupling::DataArrayInt::__pow__;
%newobject MEDCoupling::DataArrayDouble::__radd__;
%newobject MEDCoupling::DataArrayDouble::__rsub__;
%newobject MEDCoupling::DataArrayDouble::__rmul__;
-#ifdef USE_PYTHON3
-%newobject MEDCoupling::DataArrayDouble::__rtruediv__;
-#else
%newobject MEDCoupling::DataArrayDouble::__rdiv__;
-#endif
%newobject MEDCoupling::DataArrayDouble::__pow__;
%newobject MEDCoupling::DataArrayDouble::__rpow__;
%newobject MEDCoupling::DataArrayDoubleTuple::buildDADouble;
}
}
-#ifdef USE_PYTHON3
- PyObject *__truediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
PyObject *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
- #endif
{
const char msg[]="Unexpected situation in __div__ !";
double val;
}
}
-#ifdef USE_PYTHON3
- DataArrayDouble *__rtruediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
DataArrayDouble *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
const char msg[]="Unexpected situation in __rdiv__ !";
double val;
}
}
-#ifdef USE_PYTHON3
- PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
const char msg[]="Unexpected situation in __idiv__ !";
double val;
return trueSelf;
}
-#ifdef USE_PYTHON3
- PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
MCAuto<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
MEDCoupling_DataArrayDouble____idiv___(ret,0,obj);
}
}
-#ifdef USE_PYTHON3
- DataArrayInt *__truediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
DataArrayInt *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
const char msg[]="Unexpected situation in __div__ !";
int val;
}
}
-#ifdef USE_PYTHON3
- DataArrayInt *__rtruediv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
DataArrayInt *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
const char msg[]="Unexpected situation in __rdiv__ !";
int val;
}
}
-#ifdef USE_PYTHON3
- PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
const char msg[]="Unexpected situation in __idiv__ !";
int val;
Py_XINCREF(trueSelf);
return trueSelf;
}
-
-#ifdef USE_PYTHON3
- PyObject *___itruediv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#else
PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
-#endif
{
MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
MEDCoupling_DataArrayInt____idiv___(ret,0,obj);
std::copy(PyString_AsString(strOrListOfInt),PyString_AsString(strOrListOfInt)+sz,vals.begin());
return self->findIdSequence(vals);
}
+#ifdef USE_PYTHON3
+ else if(PyUnicode_Check(strOrListOfInt))
+ {
+ Py_ssize_t sz=PyUnicode_GET_LENGTH(strOrListOfInt);
+ std::vector<char> vals(sz);
+ std::copy(PyUnicode_AsUTF8(strOrListOfInt),PyUnicode_AsUTF8(strOrListOfInt)+sz,vals.begin());
+ return self->findIdSequence(vals);
+ }
+ else if(PyByteArray_Check(strOrListOfInt))
+ {
+ Py_ssize_t sz=PyByteArray_Size(strOrListOfInt);
+ std::vector<char> vals(sz);
+ std::copy(PyByteArray_AsString(strOrListOfInt),PyByteArray_AsString(strOrListOfInt)+sz,vals.begin());
+ return self->findIdSequence(vals);
+ }
+ else if(PyBytes_Check(strOrListOfInt))
+ {
+ Py_ssize_t sz=PyBytes_Size(strOrListOfInt);
+ std::vector<char> vals(sz);
+ std::copy(PyBytes_AsString(strOrListOfInt),PyBytes_AsString(strOrListOfInt)+sz,vals.begin());
+ return self->findIdSequence(vals);
+ }
+#endif
else
throw INTERP_KERNEL::Exception("DataArrayAsciiChar::search : only strings in input supported !");
}
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCoupling import *
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCoupling import *
from MEDCouplingDataForTest import MEDCouplingDataForTest
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+from __future__ import division
+# Uncomment to be coherent with Python 3
+# from __future__ import unicode_literals
from MEDCouplingDataForTest import MEDCouplingDataForTest
from MEDCouplingRemapper import *
cI2 = [0, 44]
mTgt = MEDCouplingUMesh("target", 3)
mSrc = MEDCouplingUMesh("src", 3)
- mTgt.setCoords(DataArrayDouble(coo1, len(coo1)/3, 3))
- mSrc.setCoords(DataArrayDouble(coo2, len(coo2)/3, 3))
+ mTgt.setCoords(DataArrayDouble(coo1, len(coo1) // 3, 3))
+ mSrc.setCoords(DataArrayDouble(coo2, len(coo2) // 3, 3))
mTgt.setConnectivity(DataArrayInt(conn1), DataArrayInt(cI1))
mSrc.setConnectivity(DataArrayInt(conn2), DataArrayInt(cI2))
%include "MEDCouplingFinalize.i"
+%pythoncode %{
+MEDFileMeshesIterator.__next__ = MEDFileMeshesIterator.next
+MEDFileAnyTypeFieldMultiTSIterator.__next__ = MEDFileAnyTypeFieldMultiTSIterator.next
+MEDFileFieldsIterator.__next__ = MEDFileFieldsIterator.next
+%}
+
%pythoncode %{
MEDFileUMesh.__new__=classmethod(MEDCouplingMEDFileUMeshnew)
del MEDCouplingMEDFileUMeshnew