Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
Howuhh committed Mar 2, 2024
1 parent 26b7202 commit 50d61b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/xminigrid/experimental/img_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
CACHE_PATH = os.environ.get("XLAND_MINIGRID_CACHE", os.path.expanduser("~/.xland_minigrid"))


def build_cache(tiles: np.ndarray, tile_size: float = 32) -> tuple[np.ndarray, np.ndarray]:
cache = np.full((tiles.shape[0], tiles.shape[1], tile_size, tile_size, 3), dtype=np.uint8, fill_value=-1)
agent_cache = np.full((tiles.shape[0], tiles.shape[1], tile_size, tile_size, 3), dtype=np.uint8, fill_value=-1)
def build_cache(tiles: np.ndarray, tile_size: int = 32) -> tuple[np.ndarray, np.ndarray]:
cache = np.zeros((tiles.shape[0], tiles.shape[1], tile_size, tile_size, 3), dtype=np.uint8)
agent_cache = np.zeros((tiles.shape[0], tiles.shape[1], tile_size, tile_size, 3), dtype=np.uint8)

for y in range(tiles.shape[0]):
for x in range(tiles.shape[1]):
Expand Down

0 comments on commit 50d61b5

Please sign in to comment.