prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  `statistics.py` wrong parameter name
  ## 🐛 Bug
  
  The functions [here](https://github.com/facebookresearch/CompilerGym/blob/e248330d2475fbcdf473cc3df951f25b5eaf4945/compiler_gym/util/statistics.py#L8) says they take `iterable` as inputs. However, `np.asarray` actually take `array_like`.
  
  [Quote:
  ](https://numpy.org/doc/stable/reference/generated/numpy.asarray.html)
  
  > Input data, in any form that can be converted to an array. This includes lists, lists of tuples, tuples, tuples of tuples, tuples of lists and ndarrays.
  
  e.g.
  ```python
  geometric_mean(i for i in range(10))
  ```
  This will fail because though it's an `iterable`, it's not an `array_like`.
  
  </issue>
  <code>
  [start of compiler_gym/util/statistics.py]
  1 # Copyright (c) Facebook, Inc. and its affiliates.
  2 #
  3 # This source code is licensed under the MIT license found in the
  4 # LICENSE file in the root directory of this source tree.
  5 import numpy as np
  6 
  7 
  8 def geometric_mean(iterable):
  9     """Zero-length-safe geometric mean."""
  10     values = np.asarray(iterable)
  11     if not values.size:
  12         return 0
  13     # Shortcut to return 0 when any element of the input is not positive.
  14     if not np.all(values > 0):
  15         return 0
  16     a = np.log(values)
  17     return np.exp(a.sum() / len(a))
  18 
  19 
  20 def arithmetic_mean(iterable):
  21     """Zero-length-safe arithmetic mean."""
  22     values = np.asarray(iterable)
  23     if not values.size:
  24         return 0
  25     return values.mean()
  26 
  27 
  28 def stdev(iterable):
  29     """Zero-length-safe standard deviation."""
  30     values = np.asarray(iterable)
  31     if not values.size:
  32         return 0
  33     return values.std()
  34
  [end of compiler_gym/util/statistics.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/compiler_gym/util/statistics.py b/compiler_gym/util/statistics.py
  --- a/compiler_gym/util/statistics.py
  +++ b/compiler_gym/util/statistics.py
  @@ -5,9 +5,9 @@
   import numpy as np
   
   
  -def geometric_mean(iterable):
  +def geometric_mean(array_like):
       """Zero-length-safe geometric mean."""
  -    values = np.asarray(iterable)
  +    values = np.asarray(array_like)
       if not values.size:
           return 0
       # Shortcut to return 0 when any element of the input is not positive.
  @@ -17,17 +17,17 @@
       return np.exp(a.sum() / len(a))
   
   
  -def arithmetic_mean(iterable):
  +def arithmetic_mean(array_like):
       """Zero-length-safe arithmetic mean."""
  -    values = np.asarray(iterable)
  +    values = np.asarray(array_like)
       if not values.size:
           return 0
       return values.mean()
   
   
  -def stdev(iterable):
  +def stdev(array_like):
       """Zero-length-safe standard deviation."""
  -    values = np.asarray(iterable)
  +    values = np.asarray(array_like)
       if not values.size:
           return 0
       return values.std()
  
verification_info: {"golden_diff": "diff --git a/compiler_gym/util/statistics.py b/compiler_gym/util/statistics.py\n--- a/compiler_gym/util/statistics.py\n+++ b/compiler_gym/util/statistics.py\n@@ -5,9 +5,9 @@\n import numpy as np\n \n \n-def geometric_mean(iterable):\n+def geometric_mean(array_like):\n     \"\"\"Zero-length-safe geometric mean.\"\"\"\n-    values = np.asarray(iterable)\n+    values = np.asarray(array_like)\n     if not values.size:\n         return 0\n     # Shortcut to return 0 when any element of the input is not positive.\n@@ -17,17 +17,17 @@\n     return np.exp(a.sum() / len(a))\n \n \n-def arithmetic_mean(iterable):\n+def arithmetic_mean(array_like):\n     \"\"\"Zero-length-safe arithmetic mean.\"\"\"\n-    values = np.asarray(iterable)\n+    values = np.asarray(array_like)\n     if not values.size:\n         return 0\n     return values.mean()\n \n \n-def stdev(iterable):\n+def stdev(array_like):\n     \"\"\"Zero-length-safe standard deviation.\"\"\"\n-    values = np.asarray(iterable)\n+    values = np.asarray(array_like)\n     if not values.size:\n         return 0\n     return values.std()\n", "issue": "`statistics.py` wrong parameter name\n## \ud83d\udc1b Bug\r\n\r\nThe functions [here](https://github.com/facebookresearch/CompilerGym/blob/e248330d2475fbcdf473cc3df951f25b5eaf4945/compiler_gym/util/statistics.py#L8) says they take `iterable` as inputs. However, `np.asarray` actually take `array_like`.\r\n\r\n[Quote:\r\n](https://numpy.org/doc/stable/reference/generated/numpy.asarray.html)\r\n\r\n> Input data, in any form that can be converted to an array. This includes lists, lists of tuples, tuples, tuples of tuples, tuples of lists and ndarrays.\r\n\r\ne.g.\r\n```python\r\ngeometric_mean(i for i in range(10))\r\n```\r\nThis will fail because though it's an `iterable`, it's not an `array_like`.\n", "before_files": [{"content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nimport numpy as np\n\n\ndef geometric_mean(iterable):\n    \"\"\"Zero-length-safe geometric mean.\"\"\"\n    values = np.asarray(iterable)\n    if not values.size:\n        return 0\n    # Shortcut to return 0 when any element of the input is not positive.\n    if not np.all(values > 0):\n        return 0\n    a = np.log(values)\n    return np.exp(a.sum() / len(a))\n\n\ndef arithmetic_mean(iterable):\n    \"\"\"Zero-length-safe arithmetic mean.\"\"\"\n    values = np.asarray(iterable)\n    if not values.size:\n        return 0\n    return values.mean()\n\n\ndef stdev(iterable):\n    \"\"\"Zero-length-safe standard deviation.\"\"\"\n    values = np.asarray(iterable)\n    if not values.size:\n        return 0\n    return values.std()\n", "path": "compiler_gym/util/statistics.py"}]}