File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
src/array_api_stubs/_draft Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 5252 from .array_object import Array
5353 from .data_types import DType
5454
55+
56+ class Device (Protocol ):
57+ """Protocol for device objects."""
58+
59+ def __eq__ (self , value : Any ) -> bool :
60+ ...
61+
62+
5563array = TypeVar ("array" , bound = "Array" )
56- device = TypeVar ("device" )
64+ device = TypeVar ("device" , bound = Device )
5765dtype = TypeVar ("dtype" , bound = "DType" )
5866SupportsDLPack = TypeVar ("SupportsDLPack" )
5967SupportsBufferProtocol = TypeVar ("SupportsBufferProtocol" )
Original file line number Diff line number Diff line change 55from typing import TYPE_CHECKING , Protocol , TypeVar
66from enum import Enum
77from .data_types import DType
8- from ._types import device as Device
8+ from ._types import Device
99
1010if TYPE_CHECKING :
1111 from ._types import (
@@ -36,7 +36,7 @@ def dtype(self) -> DType:
3636 ...
3737
3838 @property
39- def device (self ) -> " Device" : # type: ignore[type-var]
39+ def device (self ) -> Device :
4040 """
4141 Hardware device the array data resides on.
4242
You can’t perform that action at this time.
0 commit comments