Skip to content

Commit 6a948ff

Browse files
authored
Update array_api_compat/torch/_aliases.py
1 parent 662d3ae commit 6a948ff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

array_api_compat/torch/_aliases.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ def arange(start: float,
619619
return torch.empty(0, device=device, **kwargs).to(dtype)
620620
try:
621621
return torch.arange(start, stop, step, dtype=dtype, device=device, **kwargs)
622+
# torch 2.7 raises RuntimeError, 2.9 emits NotImplementedError
622623
except (NotImplementedError, RuntimeError):
623624
return torch.arange(start, stop, step, device=device, **kwargs).to(dtype)
624625

0 commit comments

Comments
 (0)