optunity icon indicating copy to clipboard operation
optunity copied to clipboard

Python: cross_validated assert on y is None, but it's not None.

Open adamwelsh opened this issue 4 years ago • 0 comments

Following the example from: https://optunity.readthedocs.io/en/latest/notebooks/notebooks/sklearn-automated-classification.html# I receive this assert:

Traceback (most recent call last):
  File "./test.py", line 57, in <module>
    @optunity.cross_validated(x=data, y=labels, num_folds=5)
  File "/x/x/x/x/venv/lib/python3.8/site-packages/optunity/cross_validation.py", line 484, in cross_validated
    assert y is None

However, in cross_validation.py , if i print(y) before the assert, y is not None, it is type List populated with data.

Any ideas?

adamwelsh avatar Jan 05 '22 23:01 adamwelsh