Bas van Beek

Results 59 comments of Bas van Beek

While I would as a general rule of thumb recommend using `signedinteger`/`unsignedinteger` over just `integer` (mostly to remain mindful of i8 + u8 -> f8 promotions), the issue you report...

A problem here is that mypy for example has yet to implement PEP 646 support (xref https://github.com/python/mypy/issues/12280), which is the absolute minimum required for implementing anything related to shape typing.

> I mean a.view('i8'). Right, so what you're talking about here boils down to [`DTypeLike`](https://github.com/numpy/numpy/blob/c37dc5f1cf5d42ddf05e0cd04a7fc528f30f20e5/numpy/typing/_dtype_like.py#L18) being (in practice) unable to accept arbitrary strings. While aforementioned annotation should eventually be refined...

So it seems that annotating the comparison operations, `==` and `!=` more specifically, will be problematic. The problem here is that `object.__eq__` is compatible with _any_ object, resulting in a...

There are a number of discussions on the `__eq__` issue scattered around the typing, typeshed and mypy repos (_e.g._ https://github.com/python/typeshed/issues/3685). it is not entirely clear to me in the first...

The `__dlpack__` [docs](https://data-apis.org/array-api/latest/API_specification/generated/array_api.array.__dlpack__.html) in the link you provided above do also clearly note that "Support for a stream value other than `None` is optional and implementation-dependent.", a case which is...

> The note only talks about the implementation for a value other than None, not about the type. That's in practice purely academic difference? The only member of the `None`...

I think we can also add `__ceil__` and `__floor__` to the list.

With the merging of https://github.com/numpy/numpy/pull/19803 `is_integer` can be crossed off the list.