Hi all,

Following recent discussion, I wanted to summarize the current status of 
extending `np.finfo` to user-defined DTypes.

At present, there is no way for user DTypes to provide their own `finfo` 
information (e.g., precision, bits, eps) [issue 
#27231](https://github.com/numpy/numpy/issues/27231).
To address this, [PR #29763](https://github.com/numpy/numpy/pull/29763) 
proposes adding a new `NPY_DT_get_finfo` slot so that user-defined floating 
DTypes can expose this metadata.
One open question from review is whether this should remain specific to 
`finfo`, or if we should generalize the mechanism so that other numeric types 
(e.g., integers via `iinfo`) could also expose their own limits.

I’d appreciate feedback on whether we should:

* start with `finfo` support for floating user DTypes only, or
* aim for a more general interface covering both `finfo`, `iinfo`, and 
potentially other numeric limits.

Best,
Swayam Singh
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: arch...@mail-archive.com

Reply via email to