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

Unable to import Pegasos module (because atleast2d_or_csr is absent) #2

Open
ChrisBg opened this issue May 11, 2015 · 2 comments
Open

Comments

@ChrisBg
Copy link

ChrisBg commented May 11, 2015

Hi Ejlb,

I' d like to use your pegasos library but when I try to import pegasos in python I obtain an ImportError which is the following:

Python 2.7.9 |Anaconda 2.2.0 (64-bit)| (default, Mar 9 2015, 16:20:48)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org

import pegasos
Traceback (most recent call last):
File "", line 1, in
File "pegasos/init.py", line 18, in
from .models import SVMPegasosBase, LogisticPegasosBase
File "pegasos/models.py", line 20, in
from .base import PegasosBase
File "pegasos/base.py", line 21, in
from sklearn.utils import atleast2d_or_csr
ImportError: cannot import name atleast2d_or_csr

I'm using the current version of scikit learn (0.16.1) in which atleast2d_or_csr isn't available.

Please would you have an idea or a solution ?

Thank you in advance,

Chris

@davidfarrugia
Copy link

davidfarrugia commented May 6, 2018

use check_array instead.

@xiemark
Copy link

xiemark commented May 18, 2018

pip install --user scikit-learn==0.13.1

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

No branches or pull requests

3 participants