Skip to content

Commit 1aaa976

Browse files
Fix bugs
1 parent f0e927d commit 1aaa976

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

adapt/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def fit(self, X, y, Xt=None, yt=None, domains=None, **fit_params):
458458
if yt is not None:
459459
Xt, yt = check_arrays(Xt, yt)
460460
else:
461-
Xt = check_array(Xt)
461+
Xt = check_array(Xt, ensure_2d=True, allow_nd=True)
462462
set_random_seed(self.random_state)
463463

464464
self._save_validation_data(X, Xt)
@@ -907,7 +907,7 @@ def fit(self, X, y, Xt=None, yt=None, domains=None, **fit_params):
907907

908908
if yt is None:
909909
yt = y
910-
check_array(Xt)
910+
check_array(Xt, ensure_2d=True, allow_nd=True)
911911
else:
912912
check_arrays(Xt, yt)
913913

adapt/feature_based/_deepcoral.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,6 @@ def train_step(self, data):
137137
# Single source
138138
Xs = Xs[0]
139139
ys = ys[0]
140-
141-
if len(Xs.shape) != 2:
142-
raise ValueError("Encoded space should "
143-
"be 2 dimensional, got, "
144-
"%s"%encoded_src.shape)
145140

146141
if self.match_mean:
147142
_match_mean = 1.

0 commit comments

Comments
 (0)