Skip to content

Commit 1a79fb0

Browse files
committed
Move 'array = torch.Tensor' under 'if TYPE_CHECKING'
1 parent e2d202f commit 1a79fb0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

array_api_compat/torch/_aliases.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
vecdot as _aliases_vecdot)
1010
from .._internal import get_xp
1111

12+
import torch
13+
1214
from typing import TYPE_CHECKING
1315
if TYPE_CHECKING:
1416
from typing import List, Optional, Sequence, Tuple, Union
1517
from ..common._typing import Device
1618
from torch import dtype as Dtype
1719

18-
import torch
19-
array = torch.Tensor
20+
array = torch.Tensor
2021

2122
_array_api_dtypes = {
2223
torch.bool,

0 commit comments

Comments
 (0)