Skip to content

Conversation

@SwayamInSync
Copy link
Member

This is a follow-up PR of work happened in #29836
Summary of prev work

  • The deprecated MachAr runtime discovery mechanism has been removed.
  • np.finfo fetches the constants provided by the compiler macros
  • new slot to fetch the dtype related constants

@SwayamInSync SwayamInSync marked this pull request as draft October 7, 2025 14:17
@SwayamInSync
Copy link
Member Author

@seberg this is the first draft, you can have a look.
Wrote all the major things. np.finfo's docstring might also needed to be modified will do it in this itself.

Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer much shorter release notes, but I like them so much I am also fine with keeping them :)

array.rst is way too large, but I suspect that dtypes.rst is only about the NumPy builtin DTypes and the whole new (and old) API for user DTypes is in array.rst.
That might be worth splitting up, but I still supect this is better to move there.

Anyway, love the docs otherwise, mostly wondering if it might be better to put in the other file.

@SwayamInSync SwayamInSync marked this pull request as ready for review October 10, 2025 09:56
@SwayamInSync
Copy link
Member Author

This is ready for the review

Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update and working on this!

If you don't mind (and don't update), I think I might just apply the tiny changes and remove that one section and put it in very soon.
(I'll just leave shortening the release notes to Chuck if he thinks they are long.)

@SwayamInSync
Copy link
Member Author

Cool, made all the suggestions

  • Removed the platform specific section, added related longdouble line inside finfo docs
  • shorten the c_api release notes
  • added part that *out in PyArrayDTypeMeta_GetConstant point to uninitialized memory and can be unaligned

platforms it is IEEE 754 binary128 (quad precision) or binary64-extended
(80-bit extended precision). On PowerPC systems, it may use the IBM
double-double format (a pair of float64 values), which has special
characteristics for precision and range.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the note is great here!

@seberg seberg merged commit a2519b5 into numpy:main Oct 13, 2025
77 checks passed
@seberg seberg changed the title DOC: Documentation related finfo refactors and new slot addition in #29836 DOC: Documentation related finfo refactors and new slot addition Oct 13, 2025
@seberg
Copy link
Member

seberg commented Oct 13, 2025

Thanks @SwayamInSync!

IndifferentArea pushed a commit to IndifferentArea/numpy that referenced this pull request Dec 7, 2025
…umpy#29836 (numpy#29889)

This is a follow-up PR of work happened in numpygh-29836

* The deprecated MachAr runtime discovery mechanism has been removed.
* np.finfo fetches the constants provided by the compiler macros
* new slot to fetch the dtype related constants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants