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

TypeError: check_array() got an unexpected keyword argument 'warn_on_dtype' #22

Open
ErinKnochenhauer opened this issue Feb 9, 2021 · 4 comments

Comments

@ErinKnochenhauer
Copy link

Good morning,

When attempting to recreate your first example (https://coclust.readthedocs.io/en/v0.2.1/examples.html) I am seeing a TypeError. Do you why this might be happening? Thanks for your help here!!

`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in
9
10 model = CoclustMod(n_clusters=4)
---> 11 model.fit(X)
12
13 print(model.modularity)

~/repos/bullseye/.venv/lib/python3.8/site-packages/coclust/coclustering/coclust_mod.py in fit(self, X, y)
91 random_state = check_random_state(self.random_state)
92
---> 93 check_array(X, accept_sparse=True, dtype="numeric", order=None,
94 copy=False, force_all_finite=True, ensure_2d=True,
95 allow_nd=False, ensure_min_samples=self.n_clusters,

~/repos/bullseye/.venv/lib/python3.8/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
61 extra_args = len(args) - len(all_args)
62 if extra_args <= 0:
---> 63 return f(*args, **kwargs)
64
65 # extra_args > 0

TypeError: check_array() got an unexpected keyword argument 'warn_on_dtype'`

Here is my pip freeze for reference:
argon2-cffi==20.1.0
asn1crypto==1.4.0
async-generator==1.10
attrs==20.3.0
azure-common==1.1.26
azure-core==1.10.0
azure-storage-blob==12.7.1
backcall==0.2.0
bleach==3.3.0
bokeh==2.2.3
boto3==1.17.1
botocore==1.20.1
certifi==2020.12.5
cffi==1.14.4
chardet==3.0.4
click==7.1.2
coclust==0.2.1
colorcet==2.0.6
cryptography==3.3.1
cycler==0.10.0
Cython==0.29.21
decorator==4.4.2
defusedxml==0.6.0
docutils==0.15.2
entrypoints==0.3
hdbscan==0.8.27
holoviews==1.14.1
hvplot==0.7.0
idna==2.10
implicit==0.4.2
importlib-metadata==2.0.0
ipykernel==5.4.3
ipython==7.20.0
ipython-genutils==0.2.0
ipywidgets==7.6.3
isodate==0.6.0
jedi==0.18.0
Jinja2==2.11.3
jmespath==0.10.0
joblib==1.0.0
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.11
jupyter-console==6.2.0
jupyter-core==4.7.1
jupyterlab-pygments==0.1.2
jupyterlab-widgets==1.0.0
kiwisolver==1.3.1
Markdown==3.3.3
MarkupSafe==1.1.1
matplotlib==3.3.4
mistune==0.8.4
msrest==0.6.21
nbclient==0.5.1
nbconvert==6.0.7
nbformat==5.1.2
nest-asyncio==1.5.1
notebook==6.2.0
numpy==1.20.0
oauthlib==3.1.0
oscrypto==1.2.1
packaging==20.9
pandas==1.2.1
pandocfilters==1.4.3
panel==0.10.3
param==1.10.1
parso==0.8.1
patsy==0.5.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.1.0
plotly==4.11.0
prometheus-client==0.9.0
prompt-toolkit==3.0.14
ptyprocess==0.7.0
pycparser==2.20
pycryptodomex==3.9.9
pyct==0.4.8
Pygments==2.7.4
PyJWT==2.0.1
pyOpenSSL==19.1.0
pyparsing==2.4.7
pyrsistent==0.17.3
python-dateutil==2.8.1
pytz==2020.5
pyviz-comms==2.0.1
PyYAML==5.4.1
pyzmq==22.0.2
qtconsole==5.0.2
QtPy==1.9.0
requests==2.25.1
requests-oauthlib==1.3.0
retrying==1.3.3
s3transfer==0.3.4
scikit-learn==0.24.1
scipy==1.6.0
seaborn==0.11.1
Send2Trash==1.5.0
six==1.15.0
snowflake-connector-python==2.3.10
statsmodels==0.12.0
terminado==0.9.2
testpath==0.4.4
threadpoolctl==2.1.0
tornado==6.1
tqdm==4.56.0
traitlets==5.0.5
typing-extensions==3.7.4.3
urllib3==1.26.3
wcwidth==0.2.5
webencodings==0.5.1
widgetsnbextension==3.5.1

@habedi
Copy link

habedi commented Jun 6, 2021

I get the same error. @ErinKnochenhauer, did you find any solutions?

@mcflem06
Copy link

I'm experiencing the same issue @ErinKnochenhauer

@mcflem06
Copy link

@habedi @ErinKnochenhauer - I managed to fix this just by removing the argument in coclust_mod.py. It's line 95.

@Arabasma
Copy link

The argument warn_on_dtype doesn't exist anymore for check_array ( you can check in the documentation of the function : https://scikit-learn.org/stable/modules/generated/sklearn.utils.check_array.html ). To make sure Coclust mod works, you need to remove it in the file coclust_mod.py

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

4 participants