code: def gradients(self):
          
          g = np.gradient(self.data.astype(np.float32))
          return g
docs: Return the gradient as a pair of numpy arrays.
  
          Returns
          -------
          :obj:`tuple` of :obj:`numpy.ndarray` of float
              The gradients of the image along each dimension.