Skip to content

MAINT/DOC: Stop pretending that np.{x} and builtins.{x} are different - #9508

Closed
eric-wieser wants to merge 2 commits into
numpy:masterfrom
eric-wieser:no-np.float
Closed

eric-wieser wants to merge 2 commits into
numpy:masterfrom
eric-wieser:no-np.float

Conversation

@eric-wieser

@eric-wieser eric-wieser commented Aug 1, 2017 •

Copy link
Copy Markdown
Member

For x in {int, bool, str, float, complex, object}. long and unicode are missing in python 3, so np.long is still useful (although np.compat.long might still be clearer).

This doesn't change any external behaviour.

It may be difficult to deprecate these (#6103), but there's no reason we should be using them within our own code, or within our documentation.

Simple find and replace of np\.(int|complex|object|str|bool|float)\b with $1.

… for x in {int, bool, str, float, complex, object}

This doesn't change any external behaviour. `long` is missing in python 3, so np.long is still useful
""" Check formatting.

This is only for the str function, and only for simple types.
The precision of np.float and np.longdouble aren't the same as the

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.

Only manual lines in this patch, to avoid the claim that float is not the same as float. Of course, the original was wrong too.

@charris

charris commented Aug 5, 2017 •

Copy link
Copy Markdown
Member

Hmm, experimented with online conflict resolution but didn't work -- I updated the true_divide test but not the implementation -> fail.

And can't figure out how to revert the commit online. Will fix ...

@charris

charris commented Aug 5, 2017

Copy link
Copy Markdown
Member

Rebased in #9517, so closing this. Thanks Eric.

@charris charris closed this Aug 5, 2017
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