X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling_Swig%2FMEDCouplingNumPyTest.py;h=e5d7943bf1531970fb5d94b28e9c0a2626e29642;hb=46b819946914fdf15215ad330f101d1bba5edc5b;hp=9631ee00e4b0e35c4f7ce0ca6ec9d060c291408f;hpb=1123dccd6613b2e8abba35182759d5c4a11ecc8d;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling_Swig/MEDCouplingNumPyTest.py b/src/MEDCoupling_Swig/MEDCouplingNumPyTest.py index 9631ee00e..e5d7943bf 100644 --- a/src/MEDCoupling_Swig/MEDCouplingNumPyTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingNumPyTest.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2014 CEA/DEN, EDF R&D +# Copyright (C) 2007-2015 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -31,7 +31,7 @@ import os,gc,weakref,unittest class MEDCouplingNumPyTest(unittest.TestCase): - @unittest.skipUnless(MEDCouplingHasNumPyBindings() and architecture()[0]=="64bit","requires numpy") + @unittest.skipUnless(MEDCouplingHasNumPyBindings(),"requires numpy") def test1(self): sz=20 a=array(0,dtype=int32) @@ -656,6 +656,14 @@ class MEDCouplingNumPyTest(unittest.TestCase): self.assertEqual(a2.tolist(),[[0.,1.,2.],[3.,4.,5.],[6.,7.,8.],[9.,10.,11.],[12.,13.,14.]]) pass + @unittest.skipUnless(MEDCouplingHasNumPyBindings(),"requires numpy") + def test27(self): + m0=DenseMatrix(DataArrayDouble([2,3,4,5,1,6]),2,3) + m0np=m0.toNumPyMatrix() + self.assertEqual(m0np.shape,(2,3)) + self.assertEqual(m0np.tolist(),[[2.0,3.0,4.0],[5.0,1.0,6.0]]) + pass + def setUp(self): pass pass