for compute function where the covariance matrix is singular.
for compute function where the covariance matrix is singular.