File tree Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Original file line number Diff line number Diff line change 29
29
Protocol ,
30
30
)
31
31
32
- from ._array_object import Array , CPU_DEVICE
33
- from numpy import (
34
- dtype ,
35
- int8 ,
36
- int16 ,
37
- int32 ,
38
- int64 ,
39
- uint8 ,
40
- uint16 ,
41
- uint32 ,
42
- uint64 ,
43
- float32 ,
44
- float64 ,
45
- )
32
+ from ._array_object import Array , _cpu_device
33
+ from ._dtypes import _DType
46
34
47
35
_T_co = TypeVar ("_T_co" , covariant = True )
48
36
49
37
class NestedSequence (Protocol [_T_co ]):
50
38
def __getitem__ (self , key : int , / ) -> _T_co | NestedSequence [_T_co ]: ...
51
39
def __len__ (self , / ) -> int : ...
52
40
53
- Device = type ( CPU_DEVICE )
41
+ Device = _cpu_device
54
42
55
- Dtype = dtype [Union [
56
- int8 ,
57
- int16 ,
58
- int32 ,
59
- int64 ,
60
- uint8 ,
61
- uint16 ,
62
- uint32 ,
63
- uint64 ,
64
- float32 ,
65
- float64 ,
66
- ]]
43
+ Dtype = _DType
67
44
68
45
if sys .version_info >= (3 , 12 ):
69
46
from collections .abc import Buffer as SupportsBufferProtocol
You can’t perform that action at this time.
0 commit comments