示例#1
0
 def test_create_dtype(self):
     result = rectangle.create(dtype=np.float)
     np.testing.assert_almost_equal(result, [[0.,0.],[1.,1.]], decimal=5)
示例#2
0
 def test_create(self):
     result = rectangle.create()
     np.testing.assert_almost_equal(result, [[0,0],[1,1]], decimal=5)
示例#3
0
 def test_create_dtype(self):
     result = rectangle.create(dtype=np.float)
     np.testing.assert_almost_equal(result, [[0.,0.],[1.,1.]], decimal=5)
示例#4
0
 def __init__(self, x=0., y=0., width=1., height=1.):
     self._m = rectangle.create(x=x,
                                y=y,
                                width=width,
                                height=height,
                                dtype=np.float32)
示例#5
0
 def test_create(self):
     result = rectangle.create()
     np.testing.assert_almost_equal(result, [[0,0],[1,1]], decimal=5)