def test_unflatten(self): disc = Discrete(10) x = [3, 5, 7] arr = disc.flatten(x) assert disc.unflatten(arr) == 3
def test_flatten(self): disc = Discrete(10) x = [3, 5, 7] arr = disc.flatten(x) assert all(arr[x] == 1)
def test_unflatten(self): disc = Discrete(10) x = [3, 5, 7] arr = disc.flatten(x) assert disc.unflatten(arr) == 3
def test_flatten(self): disc = Discrete(10) x = [3, 5, 7] arr = disc.flatten(x) assert all(arr[x] == 1)