prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Recent CI runs failing with NetCDF: HDF error
  **Description**
  
  Recent CI (and local) runs of our tests fail with messages like
  
  ```
  E   RuntimeError: NetCDF: HDF error                                                                                   
                                                                                                                        
  netCDF4/_netCDF4.pyx:1887: RuntimeError                                                                               
                                                                                                                        
  During handling of the above exception, another exception occurred:                                                   
                                                                                                                        
  self = <heat.core.tests.test_io.TestIO testMethod=test_save_netcdf>                                                   
                                                                                                                        
      def test_save_netcdf(self):                                                                                       
          # netcdf support is optional                                                                                  
          if not ht.io.supports_netcdf():                                                                               
              return                                                                                                    
                                                                                                                        
          # local unsplit data                                                                                          
          local_data = ht.arange(100)                                                                                   
  >       ht.save_netcdf(local_data, self.NETCDF_OUT_PATH, self.NETCDF_VARIABLE)                                        
                                                                                                                        
  heat/core/tests/test_io.py:373:   
  ```
  
  **To Reproduce**
  Steps to reproduce the behavior:
  1. Which module/class/function is affected?
  heat/core/tests/test_io.py
  2. What are the circumstances under which the bug appears?
  ANY, just run from current master
  3. What is the exact error-message/errorous behavious?
  cf. above.
  
  
  **Expected behavior**
  Tests should run successfully.
  
  **Illustrative**
  https://travis-ci.com/helmholtz-analytics/heat/builds/135270829
  
  **Version Info**
  Topic branch, but master would suffer from a rebuild.
  
  **Additional comments**
  The fix will be to pin the NetCDF dependency to <=1.5.2. Problems start to occur with 1.5.3.
  
  
  </issue>
  <code>
  [start of setup.py]
  1 from setuptools import setup
  2 import sys
  3 
  4 sys.path.append("./heat/core")
  5 import version
  6 
  7 print(version, dir(version))
  8 
  9 with open("README.md", "r") as handle:
  10     long_description = handle.read()
  11 
  12 # with open('./heat/core/version.py') as handle:
  13 #     exec(handle.read())
  14 #     print(dir())
  15 
  16 setup(
  17     name="heat",
  18     packages=["heat", "heat.core", "heat.ml", "heat.ml.cluster"],
  19     data_files=["README.md", "LICENSE"],
  20     version=version.__version__,
  21     description="A framework for high performance data analytics and machine learning.",
  22     long_description=long_description,
  23     long_description_content_type="text/markdown",
  24     author="Helmholtz Association",
  25     author_email="martin.siggel@dlr.de",
  26     url="https://github.com/helmholtz-analytics/heat",
  27     keywords=["data", "analytics", "tensors", "distributed", "gpu"],
  28     classifiers=[
  29         "Development Status :: 2 - Pre-Alpha",
  30         "Programming Language :: Python :: 3.5",
  31         "License :: OSI Approved :: MIT License",
  32         "Intended Audience :: Science/Research",
  33         "Topic :: Scientific/Engineering",
  34     ],
  35     install_requires=["mpi4py>=3.0.0", "numpy>=1.13.0", "torch==1.3.0"],
  36     extras_require={
  37         "hdf5": ["h5py>=2.8.0"],
  38         "netcdf": ["netCDF4>=1.4.0"],
  39         "dev": ["pre-commit>=1.18.3"],
  40     },
  41 )
  42
  [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
  @@ -35,7 +35,7 @@
       install_requires=["mpi4py>=3.0.0", "numpy>=1.13.0", "torch==1.3.0"],
       extras_require={
           "hdf5": ["h5py>=2.8.0"],
  -        "netcdf": ["netCDF4>=1.4.0"],
  +        "netcdf": ["netCDF4>=1.4.0,<=1.5.2"],
           "dev": ["pre-commit>=1.18.3"],
       },
   )
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -35,7 +35,7 @@\n     install_requires=[\"mpi4py>=3.0.0\", \"numpy>=1.13.0\", \"torch==1.3.0\"],\n     extras_require={\n         \"hdf5\": [\"h5py>=2.8.0\"],\n-        \"netcdf\": [\"netCDF4>=1.4.0\"],\n+        \"netcdf\": [\"netCDF4>=1.4.0,<=1.5.2\"],\n         \"dev\": [\"pre-commit>=1.18.3\"],\n     },\n )\n", "issue": "Recent CI runs failing with NetCDF: HDF error\n**Description**\r\n\r\nRecent CI (and local) runs of our tests fail with messages like\r\n\r\n```\r\nE   RuntimeError: NetCDF: HDF error                                                                                   \r\n                                                                                                                      \r\nnetCDF4/_netCDF4.pyx:1887: RuntimeError                                                                               \r\n                                                                                                                      \r\nDuring handling of the above exception, another exception occurred:                                                   \r\n                                                                                                                      \r\nself = <heat.core.tests.test_io.TestIO testMethod=test_save_netcdf>                                                   \r\n                                                                                                                      \r\n    def test_save_netcdf(self):                                                                                       \r\n        # netcdf support is optional                                                                                  \r\n        if not ht.io.supports_netcdf():                                                                               \r\n            return                                                                                                    \r\n                                                                                                                      \r\n        # local unsplit data                                                                                          \r\n        local_data = ht.arange(100)                                                                                   \r\n>       ht.save_netcdf(local_data, self.NETCDF_OUT_PATH, self.NETCDF_VARIABLE)                                        \r\n                                                                                                                      \r\nheat/core/tests/test_io.py:373:   \r\n```\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Which module/class/function is affected?\r\nheat/core/tests/test_io.py\r\n2. What are the circumstances under which the bug appears?\r\nANY, just run from current master\r\n3. What is the exact error-message/errorous behavious?\r\ncf. above.\r\n\r\n\r\n**Expected behavior**\r\nTests should run successfully.\r\n\r\n**Illustrative**\r\nhttps://travis-ci.com/helmholtz-analytics/heat/builds/135270829\r\n\r\n**Version Info**\r\nTopic branch, but master would suffer from a rebuild.\r\n\r\n**Additional comments**\r\nThe fix will be to pin the NetCDF dependency to <=1.5.2. Problems start to occur with 1.5.3.\r\n\n", "before_files": [{"content": "from setuptools import setup\nimport sys\n\nsys.path.append(\"./heat/core\")\nimport version\n\nprint(version, dir(version))\n\nwith open(\"README.md\", \"r\") as handle:\n    long_description = handle.read()\n\n# with open('./heat/core/version.py') as handle:\n#     exec(handle.read())\n#     print(dir())\n\nsetup(\n    name=\"heat\",\n    packages=[\"heat\", \"heat.core\", \"heat.ml\", \"heat.ml.cluster\"],\n    data_files=[\"README.md\", \"LICENSE\"],\n    version=version.__version__,\n    description=\"A framework for high performance data analytics and machine learning.\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    author=\"Helmholtz Association\",\n    author_email=\"martin.siggel@dlr.de\",\n    url=\"https://github.com/helmholtz-analytics/heat\",\n    keywords=[\"data\", \"analytics\", \"tensors\", \"distributed\", \"gpu\"],\n    classifiers=[\n        \"Development Status :: 2 - Pre-Alpha\",\n        \"Programming Language :: Python :: 3.5\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Intended Audience :: Science/Research\",\n        \"Topic :: Scientific/Engineering\",\n    ],\n    install_requires=[\"mpi4py>=3.0.0\", \"numpy>=1.13.0\", \"torch==1.3.0\"],\n    extras_require={\n        \"hdf5\": [\"h5py>=2.8.0\"],\n        \"netcdf\": [\"netCDF4>=1.4.0\"],\n        \"dev\": [\"pre-commit>=1.18.3\"],\n    },\n)\n", "path": "setup.py"}]}