Skip to content

Commit 5817fb9

Browse files
committed
linting
1 parent ea94e54 commit 5817fb9

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

torch_scatter/gather.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
if torch.cuda.is_available():
66
from torch_scatter import gather_cuda, segment_cuda
77

8-
gat = lambda is_cuda: gather_cuda if is_cuda else gather_cpu # noqa
9-
seg = lambda is_cuda: segment_cuda if is_cuda else segment_cpu # noqa
8+
9+
def gat(is_cuda):
10+
return gather_cuda if is_cuda else gather_cpu
11+
12+
13+
def seg(is_cuda):
14+
return segment_cuda if is_cuda else segment_cpu
1015

1116

1217
class GatherCOO(torch.autograd.Function):

torch_scatter/segment.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
if torch.cuda.is_available():
77
from torch_scatter import segment_cuda, gather_cuda
88

9-
seg = lambda is_cuda: segment_cuda if is_cuda else segment_cpu # noqa
10-
gat = lambda is_cuda: gather_cuda if is_cuda else gather_cpu # noqa
9+
10+
def seg(is_cuda):
11+
return segment_cuda if is_cuda else segment_cpu
12+
13+
14+
def gat(is_cuda):
15+
return gather_cuda if is_cuda else gather_cpu
1116

1217

1318
class SegmentCOO(torch.autograd.Function):

0 commit comments

Comments
 (0)