Skip to content

Commit 662d3ae

Browse files
lucascolleyev-br
andauthored
Update array_api_compat/torch/_aliases.py
Co-authored-by: Evgeni Burovski <evgeny.burovskiy@gmail.com>
1 parent 6fa8ef8 commit 662d3ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_compat/torch/_aliases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +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-
except NotImplementedError:
622+
except (NotImplementedError, RuntimeError):
623623
return torch.arange(start, stop, step, device=device, **kwargs).to(dtype)
624624

625625
# torch.eye does not accept None as a default for the second argument and

0 commit comments

Comments
 (0)