prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Updated setup.py for pytorch > 0.4 dependency
  # Description
  
  I had 0.3.1 for Torch and that caused issues with some of the doctesting as the distributions did not have `cdf` methods. I forced an upgrade pytorch and things are fine now.
  
  </issue>
  <code>
  [start of setup.py]
  1 from setuptools import setup, find_packages
  2 setup(
  3   name = 'pyhf',
  4   version = '0.0.8',
  5   description = '(partial) pure python histfactory implementation',
  6   url = '',
  7   author = 'Lukas Heinrich',
  8   author_email = 'lukas.heinrich@cern.ch',
  9   packages = find_packages(),
  10   include_package_data = True,
  11   install_requires = [
  12     'numpy>=1.14.3',
  13     'scipy'
  14   ],
  15   extras_require = {
  16     'xmlimport': [
  17        'uproot',
  18      ],
  19     'torch': [
  20       'torch'
  21     ],
  22     'mxnet':[
  23       'mxnet',
  24     ],
  25     'develop': [
  26        'pyflakes',
  27        'pytest>=3.5.1',
  28        'pytest-cov>=2.5.1',
  29        'pytest-benchmark[histogram]',
  30        'python-coveralls',
  31        'matplotlib',
  32        'jupyter',
  33        'uproot',
  34        'papermill',
  35        'torch',
  36        'tensorflow',
  37        'mxnet>=1.0.0',
  38        'graphviz',
  39        'sphinx',
  40        'sphinxcontrib-bibtex',
  41        'sphinxcontrib-napoleon',
  42        'sphinx_rtd_theme',
  43        'nbsphinx',
  44        'jsonpatch',
  45        'jsonschema>=2.6.0'
  46     ]
  47   },
  48   entry_points = {
  49   },
  50   dependency_links = [
  51   ]
  52 )
  53
  [end of setup.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/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -9,7 +9,7 @@
     packages = find_packages(),
     include_package_data = True,
     install_requires = [
  -    'numpy>=1.14.3',
  +    'numpy<=1.14.5,>=1.14.3',  # required by tensorflow, mxnet, and us
       'scipy'
     ],
     extras_require = {
  @@ -17,10 +17,18 @@
          'uproot',
        ],
       'torch': [
  -      'torch'
  +      'torch>=0.4.0'
       ],
       'mxnet':[
  -      'mxnet',
  +      'mxnet>=1.0.0',
  +      'requests<2.19.0,>=2.18.4',
  +      'numpy<1.15.0,>=1.8.2',
  +      'requests<2.19.0,>=2.18.4',
  +    ],
  +    'tensorflow':[
  +       'tensorflow==1.10.0',
  +       'numpy<=1.14.5,>=1.13.3',
  +       'setuptools<=39.1.0',
       ],
       'develop': [
          'pyflakes',
  @@ -28,13 +36,11 @@
          'pytest-cov>=2.5.1',
          'pytest-benchmark[histogram]',
          'python-coveralls',
  +       'coverage==4.0.3',  # coveralls
          'matplotlib',
          'jupyter',
          'uproot',
          'papermill',
  -       'torch',
  -       'tensorflow',
  -       'mxnet>=1.0.0',
          'graphviz',
          'sphinx',
          'sphinxcontrib-bibtex',
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -9,7 +9,7 @@\n   packages = find_packages(),\n   include_package_data = True,\n   install_requires = [\n-    'numpy>=1.14.3',\n+    'numpy<=1.14.5,>=1.14.3',  # required by tensorflow, mxnet, and us\n     'scipy'\n   ],\n   extras_require = {\n@@ -17,10 +17,18 @@\n        'uproot',\n      ],\n     'torch': [\n-      'torch'\n+      'torch>=0.4.0'\n     ],\n     'mxnet':[\n-      'mxnet',\n+      'mxnet>=1.0.0',\n+      'requests<2.19.0,>=2.18.4',\n+      'numpy<1.15.0,>=1.8.2',\n+      'requests<2.19.0,>=2.18.4',\n+    ],\n+    'tensorflow':[\n+       'tensorflow==1.10.0',\n+       'numpy<=1.14.5,>=1.13.3',\n+       'setuptools<=39.1.0',\n     ],\n     'develop': [\n        'pyflakes',\n@@ -28,13 +36,11 @@\n        'pytest-cov>=2.5.1',\n        'pytest-benchmark[histogram]',\n        'python-coveralls',\n+       'coverage==4.0.3',  # coveralls\n        'matplotlib',\n        'jupyter',\n        'uproot',\n        'papermill',\n-       'torch',\n-       'tensorflow',\n-       'mxnet>=1.0.0',\n        'graphviz',\n        'sphinx',\n        'sphinxcontrib-bibtex',\n", "issue": "Updated setup.py for pytorch > 0.4 dependency\n# Description\r\n\r\nI had 0.3.1 for Torch and that caused issues with some of the doctesting as the distributions did not have `cdf` methods. I forced an upgrade pytorch and things are fine now.\n", "before_files": [{"content": "from setuptools import setup, find_packages\nsetup(\n  name = 'pyhf',\n  version = '0.0.8',\n  description = '(partial) pure python histfactory implementation',\n  url = '',\n  author = 'Lukas Heinrich',\n  author_email = 'lukas.heinrich@cern.ch',\n  packages = find_packages(),\n  include_package_data = True,\n  install_requires = [\n    'numpy>=1.14.3',\n    'scipy'\n  ],\n  extras_require = {\n    'xmlimport': [\n       'uproot',\n     ],\n    'torch': [\n      'torch'\n    ],\n    'mxnet':[\n      'mxnet',\n    ],\n    'develop': [\n       'pyflakes',\n       'pytest>=3.5.1',\n       'pytest-cov>=2.5.1',\n       'pytest-benchmark[histogram]',\n       'python-coveralls',\n       'matplotlib',\n       'jupyter',\n       'uproot',\n       'papermill',\n       'torch',\n       'tensorflow',\n       'mxnet>=1.0.0',\n       'graphviz',\n       'sphinx',\n       'sphinxcontrib-bibtex',\n       'sphinxcontrib-napoleon',\n       'sphinx_rtd_theme',\n       'nbsphinx',\n       'jsonpatch',\n       'jsonschema>=2.6.0'\n    ]\n  },\n  entry_points = {\n  },\n  dependency_links = [\n  ]\n)\n", "path": "setup.py"}]}