code: def load_data(filename):
          
          file_root, file_ext = os.path.splitext(filename)
          data = None
          if file_ext == '.npy':
              data = np.load(filename)
          elif file_ext == '.npz':
              data = np.load(filename)['arr_0']
          else:
              raise ValueError('Extension %s not supported for point reads' %(file_ext))
          return data
docs: Loads data from a file.
  
          Parameters
          ----------
          filename : :obj:`str`
              The file to load the collection from.
  
          Returns
          -------
          :obj:`numpy.ndarray` of float
              The data read from the file.
  
          Raises
          ------
          ValueError
              If the file extension is not .npy or .npz.