Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Env creation tutorial 3: Change action mask type to int8 #1038

Merged
merged 1 commit into from Jul 24, 2023

Conversation

BertrandDecoster
Copy link
Contributor

Description

The expected type of an action mask in gymnasium is int8 (cf https://github.com/Farama-Foundation/Gymnasium/blob/40822a9e8fabb5b064597aaf1982f997162bd369/gymnasium/spaces/discrete.py#L58)

assert (
                mask.dtype == np.int8
            ), f"The expected dtype of the mask is np.int8, actual dtype: {mask.dtype}"

This PR just changes the type of the mask to the right type

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have run pytest -v and no errors are present.
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I solved any possible warnings that pytest -v has generated that are related to my code to the best of my knowledge.
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

It's just a doc change

@elliottower elliottower merged commit e9127d3 into Farama-Foundation:master Jul 24, 2023
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants