Skip to content

Commit

Permalink
fix(nyz): fix bfs test py3.9 compatibility bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PaParaZz1 committed Mar 10, 2023
1 parent 7601e03 commit 3b43ec0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dizoo/maze/envs/maze_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def size(self):

def process_states(self, observations, maze_maps):
"""Returns [B, W, W, 3] binary values. Channels are (wall; goal; obs)"""
loc = np.eye(self._size * self._size, dtype=np.long)[observations[0] * self._size + observations[1]]
loc = np.eye(self._size * self._size, dtype=np.int64)[observations[0] * self._size + observations[1]]
loc = np.reshape(loc, [self._size, self._size])
maze_maps = maze_maps.astype(np.long)
maze_maps = maze_maps.astype(np.int64)

states = np.concatenate([maze_maps, loc[Ellipsis, None]], axis=-1, dtype=np.long)
states = np.concatenate([maze_maps, loc[Ellipsis, None]], axis=-1, dtype=np.int64)
return states

def get_maze_map(self, stacked=True):
Expand Down

0 comments on commit 3b43ec0

Please sign in to comment.