mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-07-31 05:44:31 +00:00
Python 3.9 support (#2088)
* try changes in pr 1804 * fix classifiers * typo
This commit is contained in:
@@ -8,11 +8,12 @@ env:
|
||||
- PY_VER=3.6.12
|
||||
- PY_VER=3.7.9
|
||||
- PY_VER=3.8.6
|
||||
- PY_VER=3.9.0
|
||||
|
||||
install: "" # so travis doesn't do pip install requirements.txt
|
||||
script:
|
||||
- docker build -f py.Dockerfile --build-arg MUJOCO_KEY=$MUJOCO_KEY --build-arg PYTHON_VER=$PY_VER -t gym-test .
|
||||
- docker run gym-test
|
||||
- docker run gym-test
|
||||
|
||||
deploy:
|
||||
provider: pypi
|
||||
|
@@ -1,6 +1,7 @@
|
||||
"""An observation wrapper that augments observations by pixel values."""
|
||||
|
||||
import collections
|
||||
from collections.abc import MutableMapping
|
||||
import copy
|
||||
|
||||
import numpy as np
|
||||
@@ -8,6 +9,7 @@ import numpy as np
|
||||
from gym import spaces
|
||||
from gym import ObservationWrapper
|
||||
|
||||
|
||||
STATE_KEY = 'state'
|
||||
|
||||
|
||||
@@ -60,7 +62,7 @@ class PixelObservationWrapper(ObservationWrapper):
|
||||
self._observation_is_dict = False
|
||||
invalid_keys = set([STATE_KEY])
|
||||
elif isinstance(wrapped_observation_space,
|
||||
(spaces.Dict, collections.MutableMapping)):
|
||||
(spaces.Dict, MutableMapping)):
|
||||
self._observation_is_dict = True
|
||||
invalid_keys = set(wrapped_observation_space.spaces.keys())
|
||||
else:
|
||||
|
Reference in New Issue
Block a user