Repository navigation
Conversation
| Because of this, they are not exposed to Python. | ||
| Because of this, they are not exposed to Python. From NumPy 2.0 to 2.5 they | ||
| were exposed without the `Ptr` suffix, at some point the non-pointer version | ||
| will be removed. |
There was a problem hiding this comment.
I don't think this is enough for someone who is implementing a user DType to understand what to do about this change.
To make that concrete - how should e.g. numpy_quaddtype adapt to this API change? It's not completely clear to me what to do based on these docs changes. The text you've added here also isn't very greppable for someone who is searching for the old name in the docs.
| NPY_NO_EXPORT extern PyTypeObject *PyArrayDTypeMeta_TypePtr; | ||
| /* | ||
| * This is made public in _public_dtype_api_table.h via the PyArray_API table, | ||
| * where it is a dereferenced pointer. Maybe deprecate at some point. |
There was a problem hiding this comment.
given that isn't not deprecated, we probably still need to document it...
|
Maybe I didn't think about it enough on the other PR? Because while it seems generally nicer if these were exposed as the pointers, I dunno if there is much of a need in practice One thing is that it isn't just the DTypes, if we have a reason to ask users to switch, then it makes sense for all the other types as well (array, scalars, iterators, ...). All I didn't love is mixing the two patterns ( |
PR summary
Pulled out of #31071.
This will make it easier to move to heap types.
AI Disclosure
Claude helped me fix the fallout of the rough regex replacements I did. I only used AI to find the cause of compilation failures and typos, but fixed the problems myself.
Once this goes in I will rebase #31071 on top of it