Skip to content

Commit 3e268e5

Browse files
committed
fix linting
1 parent 80ef48a commit 3e268e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deepmd/pt/utils/nlist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def build_neighbor_list(
146146
# Efficiently subtract 1 from diagonal elements rr[b, i, i] for i < min(nloc, nall).
147147
# nall is rr.shape[2] here.
148148
diag_len = min(nloc, nall)
149-
idx = torch.arange(diag_len, device=rr.device)
149+
idx = torch.arange(diag_len, device=rr.device, dtype=torch.int)
150150
rr[:, idx, idx] -= 1.0
151151

152152
nsel = sum(sel)

0 commit comments

Comments
 (0)