Skip to content

Commit

Permalink
updated numpy to 2.0.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
BolunDai0216 committed Oct 22, 2024
1 parent e59c273 commit 1309a10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy>=1.18.0
gymnasium>=0.26
numpy>=2.0.0
gymnasium>=1.0.0
pygame>=2.2.0
2 changes: 1 addition & 1 deletion tests/test_wfc/test_wfc_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_entropyLocationHeuristic() -> None:
wave = np.ones((5, 3, 4), dtype=bool) # everything is possible
wave[1:, 0, 0] = False # first cell is fully observed
wave[4, :, 2] = False
preferences: NDArray[np.float_] = np.ones((3, 4), dtype=np.float_) * 0.5
preferences: NDArray[np.float64] = np.ones((3, 4), dtype=np.float64) * 0.5
preferences[1, 2] = 0.3
preferences[1, 1] = 0.1
heu = wfc_solver.makeEntropyLocationHeuristic(preferences)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,11 @@ def test_symbolic_obs_wrapper(env_id):
goal_pos = env.unwrapped.goal_pos

assert obs["image"].shape == (env.unwrapped.width, env.unwrapped.height, 3)
assert np.alltrue(
assert np.all(
obs["image"][agent_pos[0], agent_pos[1], :]
== np.array([agent_pos[0], agent_pos[1], OBJECT_TO_IDX["agent"]])
)
assert np.alltrue(
assert np.all(
obs["image"][goal_pos[0], goal_pos[1], :]
== np.array([goal_pos[0], goal_pos[1], OBJECT_TO_IDX["goal"]])
)
Expand All @@ -319,11 +319,11 @@ def test_symbolic_obs_wrapper(env_id):
goal_pos = env.unwrapped.goal_pos

assert obs["image"].shape == (env.unwrapped.width, env.unwrapped.height, 3)
assert np.alltrue(
assert np.all(
obs["image"][agent_pos[0], agent_pos[1], :]
== np.array([agent_pos[0], agent_pos[1], OBJECT_TO_IDX["agent"]])
)
assert np.alltrue(
assert np.all(
obs["image"][goal_pos[0], goal_pos[1], :]
== np.array([goal_pos[0], goal_pos[1], OBJECT_TO_IDX["goal"]])
)
Expand Down

0 comments on commit 1309a10

Please sign in to comment.