Skip to content

Commit

Permalink
Check if label is explicitly None because it can be also 0
Browse files Browse the repository at this point in the history
  • Loading branch information
HealthyPear committed Apr 15, 2021
1 parent 95cff80 commit d10dac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protopipe/mva/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def prepare_data(ds, derived_features, cuts, select_data=True, label=None):
# This is always useful
ds["log10_true_energy"] = np.log10(ds["true_energy"])

if label: # only for classification
if label is not None: # only for classification
ds["label"] = np.full(len(ds), label)

# This is needed because our reference analysis uses energy as
Expand Down

0 comments on commit d10dac3

Please sign in to comment.