You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
numpy-dev build failure related to array repr/str formatting changes #8959
======================================================================
FAIL: Doctest: sklearn.utils.shuffle
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/python/3.5.3/lib/python3.5/doctest.py", line 2190, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for sklearn.utils.shuffle
File "/home/travis/build/scikit-learn/scikit-learn/sklearn/utils/__init__.py", line 277, in shuffle
----------------------------------------------------------------------
File "/home/travis/build/scikit-learn/scikit-learn/sklearn/utils/__init__.py", line 318, in sklearn.utils.shuffle
Failed example:
X
Expected:
array([[ 0., 0.],
[ 2., 1.],
[ 1., 0.]])
Got:
array([[0., 0.],
[2., 1.],
[1., 0.]])
----------------------------------------------------------------------
File "/home/travis/build/scikit-learn/scikit-learn/sklearn/utils/__init__.py", line 327, in sklearn.utils.shuffle
Failed example:
X_sparse.toarray()
Expected:
array([[ 0., 0.],
[ 2., 1.],
[ 1., 0.]])
Got:
array([[0., 0.],
[2., 1.],
[1., 0.]])
>> raise self.failureException(self.format_failure(<_io.StringIO object at 0x7f8a331c9c18>.getvalue()))
My preference would be to not do anything until numpy 1.4 is released and then either run our doctests with numpy 1.14 only. If deemed necessary we can change setup.cfg to not run the doctest by default, this way less people with numpy <= 1.13 are likely to hit test failures they will have to scratch their head over.
changed the title [-]numpy-dev build failure related to 0d array formatting[/-][+]numpy-dev build failure related to array repr/str formatting changes[/+]on Sep 29, 2017
How do we manage your favourite option for when users run the test suite?
Notify them "skipping doctests" when their version comes back incorrect?
Would we be losing much fidelity with a global NORMALIZE_WHITESPACE with
pytest? See also #1253.
To be honest I think I was planning to kick this one down the road for a bit. I don'am pretty sure NORMALIZE_WHITESPACE is not enough to make the doctest pass. There are two options AFAICS:
there is a way to set the numpy array formatting to its legacy behaviour (probably the simplest option).We could add something like this in the conftest.py in the root folder for example:
Thanks a lot for keeping track of this! I am going to reopen this one, because we are still skipping the doctests of the doc folder (aka make test-doc) at the moment.
I think we are just waiting for numpy/numpy#10059 and then we can enable make test-doc for the numpy-dev build.
Activity
lesteve commentedon May 30, 2017
FYI I opened numpy/numpy#9185.
lesteve commentedon Sep 29, 2017
I am going to rename this one, because now that numpy/numpy#9139 has been merged the 0d array has been fixed but most of the other arrays have differences in repr. See https://travis-ci.org/scikit-learn/scikit-learn/jobs/281173097 for an example of failing build. 61 failures, all of them similar to this one:
My preference would be to not do anything until numpy 1.4 is released and then either run our doctests with numpy 1.14 only. If deemed necessary we can change setup.cfg to not run the doctest by default, this way less people with numpy <= 1.13 are likely to hit test failures they will have to scratch their head over.
[-]numpy-dev build failure related to 0d array formatting[/-][+]numpy-dev build failure related to array repr/str formatting changes[/+]jnothman commentedon Oct 1, 2017
lesteve commentedon Oct 1, 2017
To be honest I think I was planning to kick this one down the road for a bit. I don'am pretty sure NORMALIZE_WHITESPACE is not enough to make the doctest pass. There are two options AFAICS:
qinhanmin2014 commentedon Nov 21, 2017
I suppose this one should also be closed since cron job passes today.
jnothman commentedon Nov 21, 2017
lesteve commentedon Nov 21, 2017
Thanks a lot for keeping track of this! I am going to reopen this one, because we are still skipping the doctests of the
docfolder (akamake test-doc) at the moment.I think we are just waiting for numpy/numpy#10059 and then we can enable
make test-docfor the numpy-dev build.