Skip to content

Commit e011bf8

Browse files
committed
undo old changes to _identity.py
1 parent 284a752 commit e011bf8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pysensors/basis/_identity.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ def fit(self, X):
5353
-------
5454
self : instance
5555
"""
56-
# Store original data
57-
self.original_data = X
5856
# Note that we take a transpose here, so columns correspond to examples
5957
if self.n_basis_modes is None:
6058
self.basis_matrix_ = check_array(X).T.copy()
@@ -67,10 +65,10 @@ def fit(self, X):
6765
)
6866
)
6967

70-
self.basis_matrix_ = np.eye(X.shape[1])[:,:self.n_basis_modes] #check_array(X)[: self.n_basis_modes, :].T.copy()
68+
self.basis_matrix_ = check_array(X)[: self.n_basis_modes, :].T.copy() # np.eye(X.shape[1])[:,:self.n_basis_modes]
7169

72-
# if self.n_basis_modes < X.shape[0]:
73-
# warn(f"Only the first {self.n_basis_modes} examples were retained.")
70+
if self.n_basis_modes < X.shape[0]:
71+
warn(f"Only the first {self.n_basis_modes} examples were retained.")
7472
return self
7573

7674
def matrix_inverse(self, n_basis_modes=None):

0 commit comments

Comments
 (0)