Bas van Beek
Bas van Beek
> Yeah, you can use `isinstance(dtype, type(np.dtype("i,i")))` where the dtype call is just a weird way to get to the class. I am not quite sure if those types are...
This would seem to be the culprit; I'd expect that simply changing the datatype to `np.intp` will fix the issue. https://github.com/numpy/numpy/blob/2524a53ba30c1207770a27a513eb18a33837a145/numpy/lib/histograms.py#L973
For reference: the scalar type returned by `datetime64.item()` (or `astype("O")` in your case) depends on the unit, though I'm not sure if this actually documented somewhere? ``` python In [1]:...
> Is there a reason behind this behavior? Where can I find it? I'm afraid this was a bit before my time; I'm not familiar with the exact rationale here...
Apparently this is a bug with `builtins.float`; see https://github.com/numpy/numpy/issues/16577#issuecomment-643270992 for more details.
> Also has a default positional value of 0.0 it seems. The same holds true for all builtin scalar types as well as `generic` subclasses though, so this seems more...
> 1. How are recursive types handled? Recursive types are very common in tf's api, but my understanding is mypy doesn't support them well, pyright is happy with them, and...
`format`/`__format__` already seems to work just fine with the numpy scalar types, so I'm not sure if they're all that relevant in the context of this PR. ``` python In...
It should be quite easy to add an additional `Any`-overload serving as a `__array_ufunc__` escape hatch, as this will at least get rid of the false positive. However, I fear...
As I've yet to mention it in this issues: PR https://github.com/numpy/numpy/pull/21968 has added some basic `__array_ufunc__` support the `nin=1` ufuncs; the others are unfortunately more difficult to implement without introducing...