8000 Cleanup tests by amueller · Pull Request #5413 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Cleanup tests #5413

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

Merged
merged 2 commits into from
Oct 16, 2015
Merged

Cleanup tests #5413

merged 2 commits into from
Oct 16, 2015

Conversation

amueller
Copy link
Member

We shouldn't be comparing strings to arrays. This behavior will change in numpy and

a) create a giant boolean matrix

b) ValueError because the truth value of a boolean array is undefined.

This change was announced with numpy 1.9 so we are really behind the curve.
[There is also a minor change in here to remove two print statements, this started out as cleaning out the tests].

@lesteve
Copy link
Member
lesteve commented Oct 15, 2015

I still get a few warnings about elementwise comparison when running nosetests:

/home/lesteve/miniconda3/lib/python3.4/site-packages/matplotlib/collections.py:650
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors_original != str('face'):

/home/lesteve/dev/scikit-learn/sklearn/metrics/regression.py:355:
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if multioutput == 'raw_values':

/home/lesteve/dev/scikit-learn/sklearn/metrics/regression.py:358:
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  elif multioutput == 'uniform_average':

/home/lesteve/dev/scikit-learn/sklearn/metrics/regression.py:361:
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  elif multioutput == 'variance_weighted':

@ogrisel
Copy link
Member
ogrisel commented Oct 16, 2015

LGTM, merging this quick fix. @lesteve let's fix the other in another PR.

ogrisel added a commit that referenced this pull request Oct 16, 2015
@ogrisel ogrisel merged commit 3301893 into scikit-learn:master Oct 16, 2015
@ogrisel ogrisel added this to the 0.17 milestone Oct 16, 2015
@amueller
Copy link
Member Author

Not sure what to do about hte collections one, I thought I fixed the regressions one but maybe I overlooked one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0