# Is there a R function or Python for finding the covariance-matrix of a random vector?

## Question:

https://www.biostat.jhsph.edu/~iruczins/teaching/140.751/notes/ch3.pdf

Every R function or Python function I found finds the covariance between two vectors or returns a scalar, but I want a function that takes vector and returns a matrix.

## Answers:

There is one for numpy arrays:

https://numpy.org/doc/stable/reference/generated/numpy.cov.html .