result = self.space.belongs(point)
expected = gs.array([[True]])
with self.session():
self.assertAllClose(result, expected)
def test_random_uniform(self):
point = self.space.random_uniform()
with self.session():
self.assertAllClose(gs.eval(point).shape, (1, self.dimension))
After Change
lambda: self.metric.dist(point_a, point_b))
def test_belongs(self):
point = gs.array([-1., 3.])
result = self.space.belongs(point)
expected = gs.array([[True]])
self.assertAllClose(result, expected)