Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix FlatObsWrapper obs dtype #435

Conversation

pseudo-rnd-thoughts
Copy link
Member

Description

Fixes the following problem reported in issue #434 through modifying the dtype of the new obs array to uint8

import gymnasium
from minigrid.wrappers import FlatObsWrapper

env = FlatObsWrapper(gymnasium.make("MiniGrid-Empty-5x5-v0"))
observation, info = env.reset(seed=42)
print(env.observation_space.dtype)
print(observation.dtype)
assert env.observation_space.dtype == observation.dtype

@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit 6762cb1 into Farama-Foundation:master Jun 6, 2024
4 of 8 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant