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

TST: rank removed in Numpy 1.18 #9075

Merged
merged 2 commits into from
Aug 2, 2019
Merged

TST: rank removed in Numpy 1.18 #9075

merged 2 commits into from
Aug 2, 2019

Conversation

pllim
Copy link
Member

@pllim pllim commented Aug 1, 2019

Attempt to fix this failure in numpy dev job caused by numpy/numpy#14039

AttributeError: module 'numpy' has no attribute 'rank'

Example log: https://travis-ci.org/astropy/astropy/jobs/566097785

Note for reviewer: Numpy dev job will still fail due to #8976. I am also not sure what to milestone for Numpy 1.18 support.

@bsipocz
Copy link
Member

bsipocz commented Aug 1, 2019

We still have a numpy dev build for on both release branches. So even though I said before that it makes no sense to backport this as the numpy 1.18 release will be after we already release the next LTS, our life might be easier if we just backport.
Alternatively the dev testing jobs could probably be removed from those branches.

@mhvk - what do you think?

@mhvk
Copy link
Contributor

mhvk commented Aug 1, 2019

I think that since numpy >=1.17 is for python3 only, and the python2 compatibility stuff is really meant to be removed for 1.18 (IIRC), it makes little sense to test numpy-dev with LTS. I cannot really imagine why anyone would run astropy 2.0 with numpy >=1.17...

Copy link
Contributor

@mhvk mhvk left a comment

Choose a reason for hiding this comment

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

This looks good except sadly I coded it such that you also need to do it in the tests... From the travis log,

astropy/units/tests/test_quantity_non_ufuncs.py:1759: in <module>
945
    np.asscalar, np.rank

}
if NUMPY_LT_1_18:
Copy link
Member Author

Choose a reason for hiding this comment

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

@mhvk , like this?

Copy link
Member

Choose a reason for hiding this comment

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

I think yes, given he said to do the same for the test. With this assumption I go ahead and merge this.

@pllim
Copy link
Member Author

pllim commented Aug 2, 2019

Just a note that numpy dev will still fail but now it should fail with the 3 tests related to #8976 and not np.rank.

https://travis-ci.org/astropy/astropy/jobs/567131469

@bsipocz bsipocz merged commit 21fd343 into astropy:master Aug 2, 2019
@bsipocz
Copy link
Member

bsipocz commented Aug 2, 2019

Thanks @pllim!

@pllim pllim deleted the fix-np-rank branch August 3, 2019 15:36
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

3 participants