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

[MRG + 1] Fix sklearn.model_selection.tests.test_split:test_cv_iterable_wrapper on numpy master #7946

Merged
merged 1 commit into from Nov 29, 2016

Conversation

Projects
None yet
4 participants
@lesteve
Member

lesteve commented Nov 27, 2016

As mentioned in #7910 (comment) the tests started failing with numpy master one day or so ago.

What does this implement/fix? Explain your changes.

It looks like we were in a edge case of assert_array_equal. See numpy/numpy#8323 (comment) for more details.

I am using numpy.testing.assert_equal which seems better at dealing with nested structures containing arrays.

Fix tests on numpy master
Until now we were in a edge case on assert_array_equal
splits_are_equal = True
except AssertionError:
splits_are_equal = False
assert_false(splits_are_equal, "If the splits are randomized, "

This comment has been minimized.

@lesteve

lesteve Nov 27, 2016

Member

I am afraid I did not find a better way of emulating numpy.testing.assert_not_equal. Better suggestions welcome!

This comment has been minimized.

@amueller

amueller Nov 29, 2016

Member

@raghavrv just reimplemented that in #7935 where I suggested

assert_false(all([(x == y).all() for x, y in zip(cvs[1].split(*data), cv[2].split(*data))]))

which is also not the prettiest solution.

This comment has been minimized.

@amueller

amueller Nov 29, 2016

Member

we could also implement our own version of that?

@lesteve lesteve changed the title from [MRG] Fix sklearn.model_selection.tests.test_split tests on numpy master to [MRG] Fix sklearn.model_selection.tests.test_split:test_cv_iterable_wrapper on numpy master Nov 27, 2016

@jnothman

This comment has been minimized.

Member

jnothman commented Nov 29, 2016

Is this related to #7823

@amueller

This comment has been minimized.

Member

amueller commented Nov 29, 2016

LGTM as quick fix.

@amueller amueller changed the title from [MRG] Fix sklearn.model_selection.tests.test_split:test_cv_iterable_wrapper on numpy master to [MRG + 1] Fix sklearn.model_selection.tests.test_split:test_cv_iterable_wrapper on numpy master Nov 29, 2016

@raghavrv

This comment has been minimized.

Member

raghavrv commented Nov 29, 2016

LGTM as well. Feel free to merge!

@raghavrv

This comment has been minimized.

Member

raghavrv commented Nov 29, 2016

I can refactor this out of #7823...

@raghavrv raghavrv merged commit 34968d4 into scikit-learn:master Nov 29, 2016

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@raghavrv

This comment has been minimized.

Member

raghavrv commented Nov 29, 2016

Thx @lesteve

@lesteve lesteve deleted the lesteve:fix-test-on-numpy-master branch Nov 30, 2016

sergeyf added a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017

Fix tests on numpy master (scikit-learn#7946)
Until now we were in a edge case on assert_array_equal

@jakirkham jakirkham referenced this pull request Jun 12, 2017

Closed

Add NumPy 1.13 #47

Sundrique added a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017

Fix tests on numpy master (scikit-learn#7946)
Until now we were in a edge case on assert_array_equal

jakirkham added a commit to jakirkham/scikit-learn that referenced this pull request Jun 15, 2017

Fix tests on numpy master (scikit-learn#7946)
Until now we were in a edge case on assert_array_equal

amueller added a commit that referenced this pull request Jun 19, 2017

Backport NumPy 1.13.0 fixes to 0.18.X (#9137)
* Fix tests on numpy master (#7946)

Until now we were in a edge case on assert_array_equal

* Fix tests on numpy master (#8355)

numpy.apply_along_axis has changed behaviour when the function passed
in returns a 2d array

* [MRG] Updated plot_stock_market.py to use Google Finance (#9010)

* DOC updated plot_stock_market.py to use Google Finance

The implementations is intentionally very basic not to distract the users
from the example. Specifically unlike ``quotes_historical_yahoo_ochl`` it
does not cache downloaded data.

I also had to remove some symbols because the have no data on Google for
the specified date interval. These are WBA, LMT, KFT and MTU.

Closes #8899

* DOC removed plot_stock_market.py from expected failing examples

* Addressed review comments

* Addressed another pass of review comments

* [MRG] Remove DeprecationWarnings in examples due to using floats instead of ints (#8040)

NelleV added a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017

Fix tests on numpy master (scikit-learn#7946)
Until now we were in a edge case on assert_array_equal

paulha added a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017

Fix tests on numpy master (scikit-learn#7946)
Until now we were in a edge case on assert_array_equal

maskani-moh added a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017

Fix tests on numpy master (scikit-learn#7946)
Until now we were in a edge case on assert_array_equal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment