Skip to content

DOC: warn that dtype.descr is only for use in PEP3118 - #8174

Merged
charris merged 1 commit into
numpy:masterfrom
ahaldane:scary_descr
Oct 19, 2016
Merged

charris merged 1 commit into
numpy:masterfrom
ahaldane:scary_descr

Conversation

@ahaldane

Copy link
Copy Markdown
Member

This just makes the description of dtype.descr a little scarier so people don't use it when they shouldn't.

See for example #7790 #8160, also problems like #2215.

@charris

charris commented Oct 19, 2016

Copy link
Copy Markdown
Member

Thanks Allan.

@eric-wieser

eric-wieser commented Nov 18, 2018 •

Copy link
Copy Markdown
Member

This doesn't look right to me - PEP3118 doesn't say anything about __array_interface__.

Comment thread numpy/add_newdocs.py

The format is that required by the 'descr' key in the
`__array_interface__` attribute.
PEP3118 `__array_interface__` attribute.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

__array_interface__ is defined as part of https://docs.scipy.org/doc/numpy-1.15.1/reference/arrays.interface.html, not PEP3118.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, OK, I may have misunderstood.

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.

3 participants