Skip to content

Commit 3509b1d

Browse files
committed
refactor?
1 parent 6fc17ef commit 3509b1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bench.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ def load_data(params, generated_data=[], add_dtype=False, label_2d=False,
458458
else:
459459
# convert existing labels from 1- to 2-dimensional
460460
# if it's forced and possible
461-
if 'y' in element and label_2d and hasattr(full_data[element], 'reshape'):
461+
condition1: bool = 'y' in element and label_2d
462+
condition1 = condition1 and hasattr(full_data[element], 'reshape')
463+
if condition1:
462464
full_data[element] = full_data[element].reshape(
463465
(full_data[element].shape[0], 1))
464466
# add dtype property to data if it's needed and doesn't exist

0 commit comments

Comments
 (0)