code: def _calc_delta(self,ensemble,scaling_matrix=None):
          '''
          calc the scaled  ensemble differences from the mean
          '''
          mean = np.array(ensemble.mean(axis=0))
          delta = ensemble.as_pyemu_matrix()
          for i in range(ensemble.shape[0]):
              delta.x[i,:] -= mean
          if scaling_matrix is not None:
              delta = scaling_matrix * delta.T
          delta *= (1.0 / np.sqrt(float(ensemble.shape[0] - 1.0)))
          return deltf _calc_delta(self,ensemble,scaling_matrix=None):
          '''
          calc the scaled  ensemble differences from the mean
          '''
          mean = np.array(ensemble.mean(axis=0))
          delta = ensemble.as_pyemu_matrix()
          for i in range(ensemble.shape[0]):
              delta.x[i,:] -= mean
          if scaling_matrix is not None:
              delta = scaling_matrix * delta.T
          delta *= (1.0 / np.sqrt(float(ensemble.shape[0] - 1.0)))
          return delta
docs: calc the scaled  ensemble differences from the mean