Another possible way to import numpy. But I am getting error as well. I am not sure how numpy is used with pytorch.
import numpy as np
def pca(x):
x = torch.from_numpy(np.cov(x))
ev_s , eig_s = torch.from_numpy(np.linalg.eig(x))
return  ev_s , eig_s