Skip to content

Commit f1302b6

Browse files
committed
[refactor] Adress the francisco's comments
1 parent dbc1d65 commit f1302b6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

autoPyTorch/datasets/base_dataset.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,8 @@ def __getitem__(self, index: int, train: bool = True) -> Tuple[np.ndarray, ...]:
188188
A transformed single point prediction
189189
"""
190190

191-
if hasattr(self.train_tensors[0], 'loc'):
192-
X = self.train_tensors[0].iloc[[index]]
193-
else:
194-
X = self.train_tensors[0][index]
191+
X = self.train_tensors[0].iloc[[index]] if hasattr(self.train_tensors[0], 'loc') \
192+
else self.train_tensors[0][index]
195193

196194
if self.train_transform is not None and train:
197195
X = self.train_transform(X)

0 commit comments

Comments
 (0)