Skip to content

Commit

Permalink
shorten def
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusOrsoe committed May 20, 2024
1 parent f51bcc6 commit 1ee2b53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/graphnet/training/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,4 @@ def __call__(self, graph: Data) -> torch.tensor:
"""Compute label for `graph`."""
is_numu = torch.abs(graph[self._pid_key]) == 14
is_cc = graph[self._int_key] == 1
label = is_numu & is_cc
return label.type(torch.int)
return (is_numu & is_cc).type(torch.int)

0 comments on commit 1ee2b53

Please sign in to comment.