Skip to content
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

Replace calls to deprecated np.asscalar() by .item() #252

Merged
merged 1 commit into from Mar 28, 2019

Conversation

adonath
Copy link
Member

@adonath adonath commented Mar 27, 2019

Since numpy 1.16 the np.asscalar is deprecated. This PR replaces the two calls in pixcoord.py by the equivalent .item().

@keflavich
Copy link
Contributor

Is this backward-compatible?

@adonath
Copy link
Member Author

adonath commented Mar 27, 2019

@keflavich From a quick look it seems .item() is already there since numpy 1.9 or earlier (https://docs.scipy.org/doc/numpy-1.9.2/reference/generated/numpy.ndarray.item.html#numpy.ndarray.item). So this change should be backwards compatible...

@cdeil
Copy link
Member

cdeil commented Mar 28, 2019

Astropy did the same edit: https://github.com/astropy/astropy/pull/7880/files

@keflavich - merge?

@keflavich keflavich merged commit d0828af into astropy:master Mar 28, 2019
@adonath adonath deleted the remove_deprecated_asscalar branch March 28, 2019 14:10
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.

None yet

4 participants