code: def LaplaceCentreWeight(self):
          
  
          sz = [1,] * self.S.ndim
          for ax in self.axes:
              sz[ax] = self.S.shape[ax]
          lcw = 2*len(self.axes)*np.ones(sz, dtype=self.dtype)
          for ax in self.axes:
              lcw[(slice(None),)*ax + ([0, -1],)] -= 1.0
          return lcw
docs: Centre weighting matrix for TV Laplacian.