Why `_types.finfo_object` and `_types.iinfo_object`, `_array_object._array` does not inherit `Protocol` ?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Read src/array_api_stubs/_draft/_types.py at lines 60–79 and src/array_api_stubs/_draft/array_object.py at lines 19–20, then compare the declarations with the issue’s Protocol and dataclass question. The issue does not specify a concrete change or acceptance criterion, so completion requires an explicit maintainer decision about the intended type design.
Written by the indexing model from the issue text.
Description
↓
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 = TypeVar("array", bound="_array")
class _array(Protocol[Device, Dtype, PyCapsule, array])
def __add__(self, other: Union[int, float, array], /) -> array:
- Dominant language
- Python
- Stars
- 281
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from data-apis/array-api
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Maintenance
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in data-apis/array-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100