Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Conversation

@glemaitre
Copy link
Contributor

@glemaitre glemaitre commented Sep 14, 2018

Trying to lower the NumPy version when building the wheels.

@glemaitre glemaitre changed the title [WIP] MAINT: pin numpy version in windows [MRG] MAINT: pin numpy version in windows Sep 14, 2018
@ogrisel
Copy link
Contributor

ogrisel commented Sep 14, 2018

The failure on Python 3.5 is weird. Maybe you can try with numpy 1.12.1 for Python 3.5 so see it this is a bug in numpy?

@jorisvandenbossche
Copy link

If that is the case, I would still build with numpy 1.10, but test with numpy 1.12. In the travis configuration a similar distinction is used.

@ogrisel
Copy link
Contributor

ogrisel commented Sep 14, 2018

If that is the case, I would still build with numpy 1.10, but test with numpy 1.12. In the travis configuration a similar distinction is used.

I agree.

@glemaitre
Copy link
Contributor Author

I am doing a build bumping numpy. I will try to investigate the failure in a virtual machine.

@ogrisel
Copy link
Contributor

ogrisel commented Sep 14, 2018

Thanks!

@glemaitre
Copy link
Contributor Author

So the reason is that np.clip does not discard NaN in this version

In [1]: import numpy as np

In [2]: X = np.array([np.nan, 1, 2, np.nan, 10])

In [3]: np.clip(X, 0, 5)
Out[3]: array([ 0.,  1.,  2.,  0.,  5.])

in the other version, we get something like:

array([np.nan, 1., 2., np.nan, 5.])

I'll try to check why.

@ogrisel
Copy link
Contributor

ogrisel commented Sep 14, 2018

As @jorisvandenbossche said, build with the wheel oldest version of numpy and then run the tests with a newer version of numpy that does not have the bug. No need to debug old versions of numpy.

@glemaitre
Copy link
Contributor Author

glemaitre commented Sep 14, 2018

I am testing with an older version. The bug is actually this one:
numpy/numpy#7601

The issue should be solved in 1.11.3 wheel.

@ogrisel
Copy link
Contributor

ogrisel commented Sep 16, 2018

I think we should always run the tests with the newest stable version of numpy at the time of the newest scikit-learn release. WDYT @jorisvandenbossche @glemaitre ?

@glemaitre
Copy link
Contributor Author

I don't have strong opinion but it could be the most common case for most users.

@ogrisel ogrisel merged commit b9da096 into MacPython:master Sep 17, 2018
@ogrisel
Copy link
Contributor

ogrisel commented Sep 17, 2018

Thanks for the fix!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants