prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Wrong capitalization on bitgenerator MT19937
  Wrong capitalization of MT19937 in default argument values of functions in numpy.random._pickle.py
  
  ### Reproducing code example:
  
  ```python
  import numpy as np
  np.random._pickle.__randomstate_ctor() # => error
  np.random._pickle.__randomstate_ctor('mt19937') # => error
  np.random._pickle.__randomstate_ctor('MT19937') # => works
  ```
  
  ### Error message:
  
  *** ValueError: mt19937 is not a known BitGenerator module.
  
  ### Numpy/Python version information:
  
  1.17.0 3.6.8 (default, Jan 14 2019, 11:02:34) 
  [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
  
  
  </issue>
  <code>
  [start of numpy/random/_pickle.py]
  1 from .mtrand import RandomState
  2 from .philox import Philox
  3 from .pcg64 import PCG64
  4 from .sfc64 import SFC64
  5 
  6 from .generator import Generator
  7 from .mt19937 import MT19937
  8 
  9 BitGenerators = {'MT19937': MT19937,
  10                  'PCG64': PCG64,
  11                  'Philox': Philox,
  12                  'SFC64': SFC64,
  13                  }
  14 
  15 
  16 def __generator_ctor(bit_generator_name='mt19937'):
  17     """
  18     Pickling helper function that returns a Generator object
  19 
  20     Parameters
  21     ----------
  22     bit_generator_name: str
  23         String containing the core BitGenerator
  24 
  25     Returns
  26     -------
  27     rg: Generator
  28         Generator using the named core BitGenerator
  29     """
  30     if bit_generator_name in BitGenerators:
  31         bit_generator = BitGenerators[bit_generator_name]
  32     else:
  33         raise ValueError(str(bit_generator_name) + ' is not a known '
  34                                                    'BitGenerator module.')
  35 
  36     return Generator(bit_generator())
  37 
  38 
  39 def __bit_generator_ctor(bit_generator_name='mt19937'):
  40     """
  41     Pickling helper function that returns a bit generator object
  42 
  43     Parameters
  44     ----------
  45     bit_generator_name: str
  46         String containing the name of the BitGenerator
  47 
  48     Returns
  49     -------
  50     bit_generator: BitGenerator
  51         BitGenerator instance
  52     """
  53     if bit_generator_name in BitGenerators:
  54         bit_generator = BitGenerators[bit_generator_name]
  55     else:
  56         raise ValueError(str(bit_generator_name) + ' is not a known '
  57                                                    'BitGenerator module.')
  58 
  59     return bit_generator()
  60 
  61 
  62 def __randomstate_ctor(bit_generator_name='mt19937'):
  63     """
  64     Pickling helper function that returns a legacy RandomState-like object
  65 
  66     Parameters
  67     ----------
  68     bit_generator_name: str
  69         String containing the core BitGenerator
  70 
  71     Returns
  72     -------
  73     rs: RandomState
  74         Legacy RandomState using the named core BitGenerator
  75     """
  76     if bit_generator_name in BitGenerators:
  77         bit_generator = BitGenerators[bit_generator_name]
  78     else:
  79         raise ValueError(str(bit_generator_name) + ' is not a known '
  80                                                    'BitGenerator module.')
  81 
  82     return RandomState(bit_generator())
  83
  [end of numpy/random/_pickle.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/numpy/random/_pickle.py b/numpy/random/_pickle.py
  --- a/numpy/random/_pickle.py
  +++ b/numpy/random/_pickle.py
  @@ -13,7 +13,7 @@
                    }
   
   
  -def __generator_ctor(bit_generator_name='mt19937'):
  +def __generator_ctor(bit_generator_name='MT19937'):
       """
       Pickling helper function that returns a Generator object
   
  @@ -36,7 +36,7 @@
       return Generator(bit_generator())
   
   
  -def __bit_generator_ctor(bit_generator_name='mt19937'):
  +def __bit_generator_ctor(bit_generator_name='MT19937'):
       """
       Pickling helper function that returns a bit generator object
   
  @@ -59,7 +59,7 @@
       return bit_generator()
   
   
  -def __randomstate_ctor(bit_generator_name='mt19937'):
  +def __randomstate_ctor(bit_generator_name='MT19937'):
       """
       Pickling helper function that returns a legacy RandomState-like object
  
verification_info: {"golden_diff": "diff --git a/numpy/random/_pickle.py b/numpy/random/_pickle.py\n--- a/numpy/random/_pickle.py\n+++ b/numpy/random/_pickle.py\n@@ -13,7 +13,7 @@\n                  }\n \n \n-def __generator_ctor(bit_generator_name='mt19937'):\n+def __generator_ctor(bit_generator_name='MT19937'):\n     \"\"\"\n     Pickling helper function that returns a Generator object\n \n@@ -36,7 +36,7 @@\n     return Generator(bit_generator())\n \n \n-def __bit_generator_ctor(bit_generator_name='mt19937'):\n+def __bit_generator_ctor(bit_generator_name='MT19937'):\n     \"\"\"\n     Pickling helper function that returns a bit generator object\n \n@@ -59,7 +59,7 @@\n     return bit_generator()\n \n \n-def __randomstate_ctor(bit_generator_name='mt19937'):\n+def __randomstate_ctor(bit_generator_name='MT19937'):\n     \"\"\"\n     Pickling helper function that returns a legacy RandomState-like object\n", "issue": "Wrong capitalization on bitgenerator MT19937\nWrong capitalization of MT19937 in default argument values of functions in numpy.random._pickle.py\r\n\r\n### Reproducing code example:\r\n\r\n```python\r\nimport numpy as np\r\nnp.random._pickle.__randomstate_ctor() # => error\r\nnp.random._pickle.__randomstate_ctor('mt19937') # => error\r\nnp.random._pickle.__randomstate_ctor('MT19937') # => works\r\n```\r\n\r\n### Error message:\r\n\r\n*** ValueError: mt19937 is not a known BitGenerator module.\r\n\r\n### Numpy/Python version information:\r\n\r\n1.17.0 3.6.8 (default, Jan 14 2019, 11:02:34) \r\n[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]\r\n\n", "before_files": [{"content": "from .mtrand import RandomState\nfrom .philox import Philox\nfrom .pcg64 import PCG64\nfrom .sfc64 import SFC64\n\nfrom .generator import Generator\nfrom .mt19937 import MT19937\n\nBitGenerators = {'MT19937': MT19937,\n                 'PCG64': PCG64,\n                 'Philox': Philox,\n                 'SFC64': SFC64,\n                 }\n\n\ndef __generator_ctor(bit_generator_name='mt19937'):\n    \"\"\"\n    Pickling helper function that returns a Generator object\n\n    Parameters\n    ----------\n    bit_generator_name: str\n        String containing the core BitGenerator\n\n    Returns\n    -------\n    rg: Generator\n        Generator using the named core BitGenerator\n    \"\"\"\n    if bit_generator_name in BitGenerators:\n        bit_generator = BitGenerators[bit_generator_name]\n    else:\n        raise ValueError(str(bit_generator_name) + ' is not a known '\n                                                   'BitGenerator module.')\n\n    return Generator(bit_generator())\n\n\ndef __bit_generator_ctor(bit_generator_name='mt19937'):\n    \"\"\"\n    Pickling helper function that returns a bit generator object\n\n    Parameters\n    ----------\n    bit_generator_name: str\n        String containing the name of the BitGenerator\n\n    Returns\n    -------\n    bit_generator: BitGenerator\n        BitGenerator instance\n    \"\"\"\n    if bit_generator_name in BitGenerators:\n        bit_generator = BitGenerators[bit_generator_name]\n    else:\n        raise ValueError(str(bit_generator_name) + ' is not a known '\n                                                   'BitGenerator module.')\n\n    return bit_generator()\n\n\ndef __randomstate_ctor(bit_generator_name='mt19937'):\n    \"\"\"\n    Pickling helper function that returns a legacy RandomState-like object\n\n    Parameters\n    ----------\n    bit_generator_name: str\n        String containing the core BitGenerator\n\n    Returns\n    -------\n    rs: RandomState\n        Legacy RandomState using the named core BitGenerator\n    \"\"\"\n    if bit_generator_name in BitGenerators:\n        bit_generator = BitGenerators[bit_generator_name]\n    else:\n        raise ValueError(str(bit_generator_name) + ' is not a known '\n                                                   'BitGenerator module.')\n\n    return RandomState(bit_generator())\n", "path": "numpy/random/_pickle.py"}]}