コード例 #1
0
 def test_getResultCoords_type(self):
     """getResultCoords  -- if not tolist: return nx4 Numeric.array"""
     n = len(self.random_points)
     nc = Ncoords(self.random_points, tolist=1)
     nc.tolist = 0
     result = nc.getResultCoords()  ### tested call ###
     # confirm shape
     self.assertEqual((n, 4), Numeric.shape(result))
     # confirm type
     self.assertEqual(type(Numeric.array([])), type(result))
コード例 #2
0
ファイル: ncoordstest.py プロジェクト: 8848/Pymol-script-repo
 def test_getResultCoords_type(self):
     """getResultCoords  -- if not tolist: return nx4 Numeric.array"""
     n = len(self.random_points)
     nc = Ncoords(self.random_points, tolist=1)
     nc.tolist=0
     result = nc.getResultCoords() ### tested call ###
     # confirm shape
     self.assertEqual((n, 4), Numeric.shape(result))
     # confirm type
     self.assertEqual(type(Numeric.array([])), type(result))
コード例 #3
0
 def test_getResultCoords_shape(self):
     """getResultCoords  -- if tolist: return nx3 ListType"""
     n = len(self.random_points)
     nc = Ncoords(self.random_points, tolist=0)
     nc.tolist = 1
     result = nc.getResultCoords()  ### tested call ###
     # confirm shape
     self.assertEqual((n, 3), Numeric.shape(result))
     # confirm type
     self.assertEqual(type([]), type(result))
コード例 #4
0
ファイル: ncoordstest.py プロジェクト: 8848/Pymol-script-repo
 def test_getResultCoords_shape(self):
     """getResultCoords  -- if tolist: return nx3 ListType"""
     n = len(self.random_points)
     nc = Ncoords(self.random_points, tolist=0)
     nc.tolist=1
     result = nc.getResultCoords() ### tested call ###
     # confirm shape
     self.assertEqual((n, 3), Numeric.shape(result))
     # confirm type
     self.assertEqual(type([]), type(result))