avoid DeprecationWarning
This commit is contained in:
@@ -36,9 +36,9 @@ class MemoryMaze:
|
||||
return {
|
||||
**spaces,
|
||||
"reward": gym.spaces.Box(-np.inf, np.inf, (), dtype=np.float32),
|
||||
"is_first": gym.spaces.Box(0, 1, (), dtype=np.bool),
|
||||
"is_last": gym.spaces.Box(0, 1, (), dtype=np.bool),
|
||||
"is_terminal": gym.spaces.Box(0, 1, (), dtype=np.bool),
|
||||
"is_first": gym.spaces.Box(0, 1, (), dtype=bool),
|
||||
"is_last": gym.spaces.Box(0, 1, (), dtype=bool),
|
||||
"is_terminal": gym.spaces.Box(0, 1, (), dtype=bool),
|
||||
}
|
||||
|
||||
@property
|
||||
|
||||
@@ -77,8 +77,8 @@ class CollectDataset:
|
||||
dtype = {16: np.int16, 32: np.int32, 64: np.int64}[self._precision]
|
||||
elif np.issubdtype(value.dtype, np.uint8):
|
||||
dtype = np.uint8
|
||||
elif np.issubdtype(value.dtype, np.bool):
|
||||
dtype = np.bool
|
||||
elif np.issubdtype(value.dtype, bool):
|
||||
dtype = bool
|
||||
else:
|
||||
raise NotImplementedError(value.dtype)
|
||||
return value.astype(dtype)
|
||||
|
||||
Reference in New Issue
Block a user