cov2corr

copulae.core.linalg.cov2corr(cov, return_std=False)[source]

Convert covariance matrix to correlation matrix

This function does not convert subclasses of ndarrays. This requires that division is defined elementwise. np.ma.array and np.matrix are allowed.

Parameters
  • cov (ndarray) – Covariance matrix

  • return_std – If True then the standard deviation is also returned. By default only the correlation matrix is returned.

Return type

Union[ndarray, Tuple[ndarray, ndarray]]

Returns

  • corr ((N, N) ndarray) – Correlation matrix

  • std ((1, N) ndarray) – Standard deviation