Covariance and correlation

just like for standard deviation torch.std() exists,
what are the inbuilt functions to take covariance, and correlation?
i. e.
cov = (a * b).mean() - a.mean() * b.mean()
cor = cov / (a.std() * b.std())