def test_create_dtype(self): result = rectangle.create(dtype=np.float) np.testing.assert_almost_equal(result, [[0.,0.],[1.,1.]], decimal=5)
def test_create(self): result = rectangle.create() np.testing.assert_almost_equal(result, [[0,0],[1,1]], decimal=5)
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)