ó
ßÆ÷Xc           @   s2   d  d l  m Z d d l Z d d d d „ Z d S(   i   (   t   get_fileiÿÿÿÿNs   boston_housing.npziq   gš™™™™™É?c   
      C   sS  d | k o d k  n s" t  ‚ t |  d d ƒ}  t j |  ƒ } | d } | d } | j ƒ  t j j | ƒ t j j | ƒ t j j | ƒ t j j | ƒ t j | t	 t
 | ƒ d | ƒ  ƒ } t j | t	 t
 | ƒ d | ƒ  ƒ } t j | t	 t
 | ƒ d | ƒ ƒ } t j | t	 t
 | ƒ d | ƒ ƒ }	 | | f | |	 f f S(   s  Loads the Boston Housing dataset.

    # Arguments
        path: path where to cache the dataset locally
            (relative to ~/.keras/datasets).
        seed: Random seed for shuffling the data
            before computing the test split.
        test_split: fraction of the data to reserve as test set.

    # Returns
        Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`.
    i    i   t   origins:   https://s3.amazonaws.com/keras-datasets/boston_housing.npzt   xt   y(   t   AssertionErrorR    t   npt   loadt   closet   randomt   seedt   shufflet   arrayt   intt   len(
   t   pathR	   t
   test_splitt   fR   R   t   x_traint   y_traint   x_testt   y_test(    (    s<   /tmp/pip-build-X4mzal/keras/keras/datasets/boston_housing.pyt	   load_data   s    "


''''(   t   utils.data_utilsR    t   numpyR   R   (    (    (    s<   /tmp/pip-build-X4mzal/keras/keras/datasets/boston_housing.pyt   <module>   s   