parameters: (path, dtype=np.float64)
docstring: Loads an image from file.
  
      Parameters
      ----------
      path : str
          Path to image file.
      dtype : np.dtype
          Defaults to ``np.float64``, which means the image will be returned as a
          float with values between 0 and 1. If ``np.uint8`` is specified, the
          values will be between 0 and 255 and no conversion cost will be
          incurred.
docstring_summary: Loads an image from file.
docstring_tokens: Loads an image from file .
function: def load(path, dtype=np.float64):
      """
      Loads an image from file.
  
      Parameters
      ----------
      path : str
          Path to image file.
      dtype : np.dtype
          Defaults to ``np.float64``, which means the image will be returned as a
          float with values between 0 and 1. If ``np.uint8`` is specified, the
          values will be between 0 and 255 and no conversion cost will be
          incurred.
      """
      import skimage.io
      im = skimage.io.imread(path)
      if dtype == np.uint8:
          return im
      elif dtype in {np.float16, np.float32, np.float64}:
          return im.astype(dtype) / 255
      else:
          raise ValueError('Unsupported dtype')
function_tokens: def load ( path , dtype = np . float64 ) : import skimage . io im = skimage . io . imread ( path ) if dtype == np . uint8 : return im elif dtype in { np . float16 , np . float32 , np . float64 } : return im . astype ( dtype ) / 255 else : raise ValueError ( 'Unsupported dtype' )