File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ def pca(data, dims_rescaled_data=2):
1010 data -= data .mean (axis = 0 )
1111
1212 # calculate the covariance matrix
13- v = np .cov (data , rowvar = False )
13+ v = np .cov (data , rowvar = False , dtype = data . dtype )
1414
1515 # calculate eigenvectors & eigenvalues of the covariance matrix
1616 evalues , evectors = np .linalg .eigh (v )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ def pca(data, dims_rescaled_data=2):
1010 data -= data .mean (axis = 0 )
1111
1212 # calculate the covariance matrix
13- v = np .cov (data , rowvar = False )
13+ v = np .cov (data , rowvar = False , dtype = data . dtype )
1414
1515 # calculate eigenvectors & eigenvalues of the covariance matrix
1616 evalues , evectors = np .linalg .eigh (v )
You can’t perform that action at this time.
0 commit comments