Open
Description
array-api/src/array_api_stubs/_draft/_types.py
Lines 60 to 79 in 6d205d7
↓
class finfo_object(Protocol[dtype]):
"""Dataclass returned by `finfo`."""
bits: int
eps: float
max: float
min: float
smallest_normal: float
dtype: dtype
class iinfo_object(Protocol[dtype]):
"""Dataclass returned by `iinfo`."""
bits: int
max: int
min: int
dtype: dtype
I wonder why they are defined as dataclass
array-api/src/array_api_stubs/_draft/array_object.py
Lines 19 to 20 in 6d205d7
↓
array = TypeVar("array", bound="_array")
class _array(Protocol[Device, Dtype, PyCapsule, array])
def __add__(self, other: Union[int, float, array], /) -> array: