X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Ftut%2Fmedcoupling%2Ftestpil.py;h=c93ef1337f42ce8e7b2ab5098893da9a7cfe3e5a;hb=368e03e3d53f49b9b6ca36f8299d75f448207a16;hp=55708e30740eb6d039bbd0bddf3cb893169cafa3;hpb=6a68e31957114c3c3aec28d4556e81b2b6ad3e89;p=modules%2Fmed.git diff --git a/doc/tut/medcoupling/testpil.py b/doc/tut/medcoupling/testpil.py index 55708e307..c93ef1337 100755 --- a/doc/tut/medcoupling/testpil.py +++ b/doc/tut/medcoupling/testpil.py @@ -43,20 +43,20 @@ def image2matrix(): # Get the data imgdata=imgbw.getdata() width,height=imgbw.size - print list(imgdata) - print width,height + print(list(imgdata)) + print(width,height) # Convert the data in a matrix using numpy tab=numpy.array(imgdata,dtype='float64') - print list(tab) - print tab + print(list(tab)) + print(tab) nbRows=height nbCols=width matrix=numpy.reshape(tab,(nbRows,nbCols)) # Note that in the reshape function, the height (sizeY) of the image # is specified first, because it corresponds to the number of rows. - print matrix - print list(matrix) + print(matrix) + print(list(matrix)) import MEDCoupling as MC import MEDLoader as ML @@ -93,7 +93,7 @@ def createMesh(meshname, sizeX, sizeY): coordsY.setValues(arrY,nbNodesY,1) cmesh.setCoords(coordsX,coordsY) - print "Imagem mesh dimension: %d"%cmesh.getSpaceDimension() + print("Imagem mesh dimension: %d"%cmesh.getSpaceDimension()) # WARN: In the current state of development of MEDLoader, only # unstructured meshes are supported for writing function in med