Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

eric-wieser
Copy link
Member

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

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
@@ -35,7 +35,7 @@ def test_float_types():
""" 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
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
Copy link
Member

charris commented Aug 5, 2017

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
Copy link
Member

charris commented Aug 5, 2017

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