Skip to content

Commit d3a1527

Browse files
committed
np.bool is deprecated
1 parent 45278a5 commit d3a1527

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/envs/starcraft/StarCraft2Env.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,10 @@ def _launch(self):
327327
self.map_x, int(self.map_y / 8))
328328
self.pathing_grid = np.transpose(np.array([
329329
[(b >> i) & 1 for b in row for i in range(7, -1, -1)]
330-
for row in vals], dtype=np.bool))
330+
for row in vals], dtype=bool))
331331
else:
332332
self.pathing_grid = np.invert(np.flip(np.transpose(np.array(
333-
list(map_info.pathing_grid.data), dtype=np.bool).reshape(
333+
list(map_info.pathing_grid.data), dtype=bool).reshape(
334334
self.map_x, self.map_y)), axis=1))
335335

336336
self.terrain_height = np.flip(
@@ -1201,7 +1201,7 @@ def get_visibility_matrix(self):
12011201
"""
12021202
arr = np.zeros(
12031203
(self.n_agents, self.n_agents + self.n_enemies),
1204-
dtype=np.bool,
1204+
dtype=bool,
12051205
)
12061206

12071207
for agent_id in range(self.n_agents):

0 commit comments

Comments
 (0)