Explorar el Código

Remove last relative import

StringTheory hace 2 años
padre
commit
25ee4d719d
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      gym_minigrid/wrappers.py

+ 2 - 2
gym_minigrid/wrappers.py

@@ -6,7 +6,7 @@ import gym
 import numpy as np
 from gym import spaces
 
-from .minigrid import COLOR_TO_IDX, OBJECT_TO_IDX, STATE_TO_IDX, Goal
+from gym_minigrid.minigrid import COLOR_TO_IDX, OBJECT_TO_IDX, STATE_TO_IDX, Goal
 
 
 class ReseedWrapper(gym.core.Wrapper):
@@ -334,7 +334,7 @@ class DirectionObsWrapper(gym.core.ObservationWrapper):
         obs = self.env.reset()
         if not self.goal_position:
             self.goal_position = [
-                x for x, y in enumerate(self.grid.grid) if isinstance(y, (Goal))
+                x for x, y in enumerate(self.grid.grid) if isinstance(y, Goal)
             ]
             if (
                 len(self.goal_position) >= 1