X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling_Swig%2FUsersGuideExamplesTest_numpy.py;h=29c29cca9d3f77e759372aaddd104199d9eb37da;hb=1b746b38f3cdeae6654a9501f37fde5e56e59288;hp=6ad489506ebd66f9c51068333cb1b4fb22397c85;hpb=0a16028185e79b4e26b6fc56f099690770ac77c3;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling_Swig/UsersGuideExamplesTest_numpy.py b/src/MEDCoupling_Swig/UsersGuideExamplesTest_numpy.py index 6ad489506..29c29cca9 100644 --- a/src/MEDCoupling_Swig/UsersGuideExamplesTest_numpy.py +++ b/src/MEDCoupling_Swig/UsersGuideExamplesTest_numpy.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2019 CEA/DEN, EDF R&D +# Copyright (C) 2007-2024 CEA, EDF # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,10 +18,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # import sys -if sys.platform == "win32": - from MEDCouplingCompat import * -else: - from medcoupling import * +from medcoupling import * from math import pi, sqrt @@ -35,7 +32,7 @@ else: # NumPy is an optional pre-requisite! assert(MEDCoupling.MEDCouplingHasNumPyBindings()) a=numpy.arange(20,dtype=numpy.int32) -d=DataArrayInt(a) # d owns data of a -e=DataArrayInt(a) # a not owned -> e only an access to chunk of a +d=DataArrayInt32(a) # d owns data of a +e=DataArrayInt32(a) # a not owned -> e only an access to chunk of a a1=d.toNumPyArray() #! [UG_DataArrayNumpy_0]