prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Sync naming convention and style in NLP datasets
  Also fixes a possible bug with np.load()/f.close() pair not being exception-safe.
  
  </issue>
  <code>
  [start of keras/datasets/boston_housing.py]
  1 """Boston housing price regression dataset.
  2 """
  3 from __future__ import absolute_import
  4 from __future__ import division
  5 from __future__ import print_function
  6 
  7 from ..utils.data_utils import get_file
  8 import numpy as np
  9 
  10 
  11 def load_data(path='boston_housing.npz', test_split=0.2, seed=113):
  12     """Loads the Boston Housing dataset.
  13 
  14     # Arguments
  15         path: path where to cache the dataset locally
  16             (relative to ~/.keras/datasets).
  17         test_split: fraction of the data to reserve as test set.
  18         seed: Random seed for shuffling the data
  19             before computing the test split.
  20 
  21     # Returns
  22         Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`.
  23     """
  24     assert 0 <= test_split < 1
  25     path = get_file(path,
  26                     origin='https://s3.amazonaws.com/keras-datasets/boston_housing.npz',
  27                     file_hash='f553886a1f8d56431e820c5b82552d9d95cfcb96d1e678153f8839538947dff5')
  28     f = np.load(path)
  29     x = f['x']
  30     y = f['y']
  31     f.close()
  32 
  33     np.random.seed(seed)
  34     indices = np.arange(len(x))
  35     np.random.shuffle(indices)
  36     x = x[indices]
  37     y = y[indices]
  38 
  39     x_train = np.array(x[:int(len(x) * (1 - test_split))])
  40     y_train = np.array(y[:int(len(x) * (1 - test_split))])
  41     x_test = np.array(x[int(len(x) * (1 - test_split)):])
  42     y_test = np.array(y[int(len(x) * (1 - test_split)):])
  43     return (x_train, y_train), (x_test, y_test)
  44
  [end of keras/datasets/boston_housing.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/keras/datasets/boston_housing.py b/keras/datasets/boston_housing.py
  --- a/keras/datasets/boston_housing.py
  +++ b/keras/datasets/boston_housing.py
  @@ -25,10 +25,9 @@
       path = get_file(path,
                       origin='https://s3.amazonaws.com/keras-datasets/boston_housing.npz',
                       file_hash='f553886a1f8d56431e820c5b82552d9d95cfcb96d1e678153f8839538947dff5')
  -    f = np.load(path)
  -    x = f['x']
  -    y = f['y']
  -    f.close()
  +    with np.load(path) as f:
  +        x = f['x']
  +        y = f['y']
   
       np.random.seed(seed)
       indices = np.arange(len(x))
  
verification_info: {"golden_diff": "diff --git a/keras/datasets/boston_housing.py b/keras/datasets/boston_housing.py\n--- a/keras/datasets/boston_housing.py\n+++ b/keras/datasets/boston_housing.py\n@@ -25,10 +25,9 @@\n     path = get_file(path,\n                     origin='https://s3.amazonaws.com/keras-datasets/boston_housing.npz',\n                     file_hash='f553886a1f8d56431e820c5b82552d9d95cfcb96d1e678153f8839538947dff5')\n-    f = np.load(path)\n-    x = f['x']\n-    y = f['y']\n-    f.close()\n+    with np.load(path) as f:\n+        x = f['x']\n+        y = f['y']\n \n     np.random.seed(seed)\n     indices = np.arange(len(x))\n", "issue": "Sync naming convention and style in NLP datasets\nAlso fixes a possible bug with np.load()/f.close() pair not being exception-safe.\n", "before_files": [{"content": "\"\"\"Boston housing price regression dataset.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom ..utils.data_utils import get_file\nimport numpy as np\n\n\ndef load_data(path='boston_housing.npz', test_split=0.2, seed=113):\n    \"\"\"Loads the Boston Housing dataset.\n\n    # Arguments\n        path: path where to cache the dataset locally\n            (relative to ~/.keras/datasets).\n        test_split: fraction of the data to reserve as test set.\n        seed: Random seed for shuffling the data\n            before computing the test split.\n\n    # Returns\n        Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`.\n    \"\"\"\n    assert 0 <= test_split < 1\n    path = get_file(path,\n                    origin='https://s3.amazonaws.com/keras-datasets/boston_housing.npz',\n                    file_hash='f553886a1f8d56431e820c5b82552d9d95cfcb96d1e678153f8839538947dff5')\n    f = np.load(path)\n    x = f['x']\n    y = f['y']\n    f.close()\n\n    np.random.seed(seed)\n    indices = np.arange(len(x))\n    np.random.shuffle(indices)\n    x = x[indices]\n    y = y[indices]\n\n    x_train = np.array(x[:int(len(x) * (1 - test_split))])\n    y_train = np.array(y[:int(len(x) * (1 - test_split))])\n    x_test = np.array(x[int(len(x) * (1 - test_split)):])\n    y_test = np.array(y[int(len(x) * (1 - test_split)):])\n    return (x_train, y_train), (x_test, y_test)\n", "path": "keras/datasets/boston_housing.py"}]}