Skip to content
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

Bug fix: mlens.external.sklearn.type_of_target.py #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mrjoeybux
Copy link

Since python 3.10, the Sequence class of the collections module is now located at collections.abc. The fix is to check the python version and import from the correct location.

…found at collections.abc. The fix is to check the python version and import from the correct location.
@@ -7,7 +7,11 @@
# License: BSD 3 clause

from __future__ import division
from collections import Sequence
from sys import version_info
if (version_info.major == 3) and (version_info.minor == 10):
Copy link

@lolamathematician lolamathematician Sep 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could replace line 11 with

if (version_info.major == 3) and (version_info.minor >= 10):

Copy link

@miguel-angel-baubap miguel-angel-baubap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the right answer to issue.

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

Successfully merging this pull request may close these issues.

3 participants