Fix Multidiscrete.from_jsonable for windows (#932)

This commit is contained in:
Mark Towers
2024-02-21 10:10:02 +00:00
committed by GitHub
parent 2b5e555f06
commit 2cfa2e3793

View File

@@ -172,7 +172,7 @@ class MultiDiscrete(Space[NDArray[np.integer]]):
self, sample_n: list[Sequence[int]] self, sample_n: list[Sequence[int]]
) -> list[NDArray[np.integer[Any]]]: ) -> list[NDArray[np.integer[Any]]]:
"""Convert a JSONable data type to a batch of samples from this space.""" """Convert a JSONable data type to a batch of samples from this space."""
return [np.array(sample) for sample in sample_n] return [np.array(sample, dtype=np.int64) for sample in sample_n]
def __repr__(self): def __repr__(self):
"""Gives a string representation of this space.""" """Gives a string representation of this space."""