Skip to content

Commit

Permalink
numpy 2.0 bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGeorge1234 committed Jul 16, 2024
1 parent f7ff1a1 commit 85e9b10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ratinabox/contribs/TaskEnvironment.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ def add_agents(
# Add the agent's observation space to the environment's
# observation spaces dict
ext = [self.extent[i : i + 2] for i in np.arange(0, len(self.extent), 2)]
lows, highs = np.array(list(zip(*ext)), dtype=np.float_)
self.observation_spaces[name] = Box(low=lows, high=highs, dtype=np.float_)
lows, highs = np.array(list(zip(*ext)), dtype=float)
self.observation_spaces[name] = Box(low=lows, high=highs, dtype=float)
self.observation_lambda[name] = lambda agent: agent.pos

# Attach a reward cache for the agent
Expand Down

0 comments on commit 85e9b10

Please sign in to comment.