Numpy function for calculating weighted covariance matrix on dataset with nan values?

Viewed 34

I want to call the np.cov function with values passed in for the aweights argument, so that I can compute the weighted covariance matrix for a particular dataset I have. However, the problem is that my dataset has nan values inside of it, which means that I have to call np.ma.cov instead. The problem is that np.ma.cov does not accept an aweights argument (the aweights argument was introduced more recently to the np.cov function in Numpy version 1.10). Is there any easy workaround for my problem?

0 Answers
Related