prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Docs page "Ensure your experiments are reproducible"
  See #1426 
  
  </issue>
  <code>
  [start of src/garage/envs/point_env.py]
  1 """Simple 2D environment containing a point and a goal location."""
  2 import gym
  3 import numpy as np
  4 
  5 from garage.envs.step import Step
  6 
  7 
  8 class PointEnv(gym.Env):
  9     """A simple 2D point environment.
  10 
  11     Attributes:
  12         observation_space (gym.spaces.Box): The observation space
  13         action_space (gym.spaces.Box): The action space
  14 
  15     Args:
  16         goal (np.ndarray): A 2D array representing the goal position
  17         arena_size (float): The size of arena where the point is constrained
  18             within (-arena_size, arena_size) in each dimension
  19         done_bonus (float): A numerical bonus added to the reward
  20             once the point as reached the goal
  21         never_done (bool): Never send a `done` signal, even if the
  22             agent achieves the goal
  23 
  24     """
  25 
  26     def __init__(
  27             self,
  28             goal=np.array((1., 1.), dtype=np.float32),
  29             arena_size=5.,
  30             done_bonus=0.,
  31             never_done=False,
  32     ):
  33         goal = np.array(goal, dtype=np.float32)
  34         self._goal = goal
  35         self._done_bonus = done_bonus
  36         self._never_done = never_done
  37         self._arena_size = arena_size
  38 
  39         assert ((goal >= -arena_size) & (goal <= arena_size)).all()
  40 
  41         self._point = np.zeros_like(self._goal)
  42         self._task = {'goal': self._goal}
  43         self._observation_space = gym.spaces.Box(low=-np.inf,
  44                                                  high=np.inf,
  45                                                  shape=(3, ),
  46                                                  dtype=np.float32)
  47         self._action_space = gym.spaces.Box(low=-0.1,
  48                                             high=0.1,
  49                                             shape=(2, ),
  50                                             dtype=np.float32)
  51 
  52     @property
  53     def observation_space(self):
  54         """gym.spaces.Box: The observation space."""
  55         return self._observation_space
  56 
  57     @property
  58     def action_space(self):
  59         """gym.spaces.Box: The action space."""
  60         return self._action_space
  61 
  62     def reset(self):
  63         """Reset the environment.
  64 
  65         Returns:
  66             np.ndarray: Observation of the environment.
  67 
  68         """
  69         self._point = np.zeros_like(self._goal)
  70         dist = np.linalg.norm(self._point - self._goal)
  71         return np.concatenate([self._point, (dist, )])
  72 
  73     def step(self, action):
  74         """Step the environment state.
  75 
  76         Args:
  77             action (np.ndarray): The action to take in the environment.
  78 
  79         Returns:
  80             np.ndarray: Observation. The observation of the environment.
  81             float: Reward. The reward acquired at this time step.
  82             boolean: Done. Whether the environment was completed at this
  83                 time step. Always False for this environment.
  84 
  85         """
  86         # enforce action space
  87         a = action.copy()  # NOTE: we MUST copy the action before modifying it
  88         a = np.clip(a, self.action_space.low, self.action_space.high)
  89 
  90         self._point = np.clip(self._point + a, -self._arena_size,
  91                               self._arena_size)
  92         dist = np.linalg.norm(self._point - self._goal)
  93         succ = dist < np.linalg.norm(self.action_space.low)
  94 
  95         # dense reward
  96         reward = -dist
  97         # done bonus
  98         if succ:
  99             reward += self._done_bonus
  100 
  101         # sometimes we don't want to terminate
  102         done = succ and not self._never_done
  103 
  104         obs = np.concatenate([self._point, (dist, )])
  105 
  106         return Step(obs, reward, done, task=self._task, success=succ)
  107 
  108     def render(self, mode='human'):
  109         """Draw the environment.
  110 
  111         Not implemented.
  112 
  113         Args:
  114             mode (str): Ignored.
  115 
  116         """
  117         # pylint: disable=no-self-use
  118 
  119     def sample_tasks(self, num_tasks):
  120         """Sample a list of `num_tasks` tasks.
  121 
  122         Args:
  123             num_tasks (int): Number of tasks to sample.
  124 
  125         Returns:
  126             list[dict[str, np.ndarray]]: A list of "tasks", where each task is
  127                 a dictionary containing a single key, "goal", mapping to a
  128                 point in 2D space.
  129 
  130         """
  131         goals = np.random.uniform(-2, 2, size=(num_tasks, 2))
  132         tasks = [{'goal': goal} for goal in goals]
  133         return tasks
  134 
  135     def set_task(self, task):
  136         """Reset with a task.
  137 
  138         Args:
  139             task (dict[str, np.ndarray]): A task (a dictionary containing a
  140                 single key, "goal", which should be a point in 2D space).
  141 
  142         """
  143         self._task = task
  144         self._goal = task['goal']
  145
  [end of src/garage/envs/point_env.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/src/garage/envs/point_env.py b/src/garage/envs/point_env.py
  --- a/src/garage/envs/point_env.py
  +++ b/src/garage/envs/point_env.py
  @@ -24,11 +24,11 @@
       """
   
       def __init__(
  -            self,
  -            goal=np.array((1., 1.), dtype=np.float32),
  -            arena_size=5.,
  -            done_bonus=0.,
  -            never_done=False,
  +        self,
  +        goal=np.array((1., 1.), dtype=np.float32),
  +        arena_size=5.,
  +        done_bonus=0.,
  +        never_done=False,
       ):
           goal = np.array(goal, dtype=np.float32)
           self._goal = goal
  
verification_info: {"golden_diff": "diff --git a/src/garage/envs/point_env.py b/src/garage/envs/point_env.py\n--- a/src/garage/envs/point_env.py\n+++ b/src/garage/envs/point_env.py\n@@ -24,11 +24,11 @@\n     \"\"\"\n \n     def __init__(\n-            self,\n-            goal=np.array((1., 1.), dtype=np.float32),\n-            arena_size=5.,\n-            done_bonus=0.,\n-            never_done=False,\n+        self,\n+        goal=np.array((1., 1.), dtype=np.float32),\n+        arena_size=5.,\n+        done_bonus=0.,\n+        never_done=False,\n     ):\n         goal = np.array(goal, dtype=np.float32)\n         self._goal = goal\n", "issue": "Docs page \"Ensure your experiments are reproducible\"\nSee #1426 \n", "before_files": [{"content": "\"\"\"Simple 2D environment containing a point and a goal location.\"\"\"\nimport gym\nimport numpy as np\n\nfrom garage.envs.step import Step\n\n\nclass PointEnv(gym.Env):\n    \"\"\"A simple 2D point environment.\n\n    Attributes:\n        observation_space (gym.spaces.Box): The observation space\n        action_space (gym.spaces.Box): The action space\n\n    Args:\n        goal (np.ndarray): A 2D array representing the goal position\n        arena_size (float): The size of arena where the point is constrained\n            within (-arena_size, arena_size) in each dimension\n        done_bonus (float): A numerical bonus added to the reward\n            once the point as reached the goal\n        never_done (bool): Never send a `done` signal, even if the\n            agent achieves the goal\n\n    \"\"\"\n\n    def __init__(\n            self,\n            goal=np.array((1., 1.), dtype=np.float32),\n            arena_size=5.,\n            done_bonus=0.,\n            never_done=False,\n    ):\n        goal = np.array(goal, dtype=np.float32)\n        self._goal = goal\n        self._done_bonus = done_bonus\n        self._never_done = never_done\n        self._arena_size = arena_size\n\n        assert ((goal >= -arena_size) & (goal <= arena_size)).all()\n\n        self._point = np.zeros_like(self._goal)\n        self._task = {'goal': self._goal}\n        self._observation_space = gym.spaces.Box(low=-np.inf,\n                                                 high=np.inf,\n                                                 shape=(3, ),\n                                                 dtype=np.float32)\n        self._action_space = gym.spaces.Box(low=-0.1,\n                                            high=0.1,\n                                            shape=(2, ),\n                                            dtype=np.float32)\n\n    @property\n    def observation_space(self):\n        \"\"\"gym.spaces.Box: The observation space.\"\"\"\n        return self._observation_space\n\n    @property\n    def action_space(self):\n        \"\"\"gym.spaces.Box: The action space.\"\"\"\n        return self._action_space\n\n    def reset(self):\n        \"\"\"Reset the environment.\n\n        Returns:\n            np.ndarray: Observation of the environment.\n\n        \"\"\"\n        self._point = np.zeros_like(self._goal)\n        dist = np.linalg.norm(self._point - self._goal)\n        return np.concatenate([self._point, (dist, )])\n\n    def step(self, action):\n        \"\"\"Step the environment state.\n\n        Args:\n            action (np.ndarray): The action to take in the environment.\n\n        Returns:\n            np.ndarray: Observation. The observation of the environment.\n            float: Reward. The reward acquired at this time step.\n            boolean: Done. Whether the environment was completed at this\n                time step. Always False for this environment.\n\n        \"\"\"\n        # enforce action space\n        a = action.copy()  # NOTE: we MUST copy the action before modifying it\n        a = np.clip(a, self.action_space.low, self.action_space.high)\n\n        self._point = np.clip(self._point + a, -self._arena_size,\n                              self._arena_size)\n        dist = np.linalg.norm(self._point - self._goal)\n        succ = dist < np.linalg.norm(self.action_space.low)\n\n        # dense reward\n        reward = -dist\n        # done bonus\n        if succ:\n            reward += self._done_bonus\n\n        # sometimes we don't want to terminate\n        done = succ and not self._never_done\n\n        obs = np.concatenate([self._point, (dist, )])\n\n        return Step(obs, reward, done, task=self._task, success=succ)\n\n    def render(self, mode='human'):\n        \"\"\"Draw the environment.\n\n        Not implemented.\n\n        Args:\n            mode (str): Ignored.\n\n        \"\"\"\n        # pylint: disable=no-self-use\n\n    def sample_tasks(self, num_tasks):\n        \"\"\"Sample a list of `num_tasks` tasks.\n\n        Args:\n            num_tasks (int): Number of tasks to sample.\n\n        Returns:\n            list[dict[str, np.ndarray]]: A list of \"tasks\", where each task is\n                a dictionary containing a single key, \"goal\", mapping to a\n                point in 2D space.\n\n        \"\"\"\n        goals = np.random.uniform(-2, 2, size=(num_tasks, 2))\n        tasks = [{'goal': goal} for goal in goals]\n        return tasks\n\n    def set_task(self, task):\n        \"\"\"Reset with a task.\n\n        Args:\n            task (dict[str, np.ndarray]): A task (a dictionary containing a\n                single key, \"goal\", which should be a point in 2D space).\n\n        \"\"\"\n        self._task = task\n        self._goal = task['goal']\n", "path": "src/garage/envs/point_env.py"}]}