Skip to content

Commit dbc1d65

Browse files
committed
[refactor] Address the francisco's comments
1 parent 0505d5c commit dbc1d65

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

autoPyTorch/datasets/base_dataset.py

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

191-
X = self.train_tensors[0].iloc[[index]] if hasattr(self.train_tensors[0], 'loc') \
192-
else self.train_tensors[0][index]
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]
193195

194196
if self.train_transform is not None and train:
195197
X = self.train_transform(X)

0 commit comments

Comments
 (0)