Skip to content

Commit

Permalink
fix dim names
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreablin committed Dec 5, 2023
1 parent 1557b10 commit 6b65fec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions picard/dropin_sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _fit(self, X, compute_sources=False):
ensure_min_samples=2).T
random_state = check_random_state(self.random_state)

n_samples, n_features = X.shape
n_features, n_samples = X.shape

n_components = self.n_components
if not self.whiten and n_components is not None:
Expand Down Expand Up @@ -164,7 +164,7 @@ def _fit(self, X, compute_sources=False):
K = (u / d).T[:n_components]
del u, d
X1 = np.dot(K, X)
X1 *= np.sqrt(n_features)
X1 *= np.sqrt(n_samples)
else:
# X must be casted to floats to avoid typing issues with numpy
# 2.0 and the line below
Expand Down

0 comments on commit 6b65fec

Please sign in to comment.