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: H should have the same dtype as X. Get H.dtype = float64. #9

Closed
youwh1996 opened this issue Oct 3, 2020 · 4 comments
Closed

Comments

@youwh1996
Copy link

An error occurred when I tried to use k_selection_plot

@youwh1996
Copy link
Author

Traceback (most recent call last):
File "./cNMF/cnmf.py", line 883, in
cnmf_obj.k_selection_plot()
File "./cNMF/cnmf.py", line 696, in k_selection_plot
stats.append(self.consensus(k, skip_density_and_return_after_stats=True).stats)
File "./cNMF/cnmf.py", line 556, in consensus
nmf_kwargs=refit_nmf_kwargs)
File "./cNMF/cnmf.py", line 410, in _nmf
(usages, spectra, niter) = non_negative_factorization(X, **nmf_kwargs)
File "/public/workspace/youwh/.local/lib/python3.6/site-packages/sklearn/utils/validation.py", line 72, in inner_f
return f(**kwargs)
File "/public/workspace/youwh/.local/lib/python3.6/site-packages/sklearn/decomposition/_nmf.py", line 1044, in non_negative_factorization
"{}.".format(H.dtype))
TypeError: H should have the same dtype as X. Got H.dtype = float64.

@jasminelmah
Copy link

jasminelmah commented Oct 22, 2020

I followed the solution provided by d-laub and Pentayouth, which worked: #8 (comment)

@dylkot
Copy link
Owner

dylkot commented Oct 25, 2020

OK great, is there still an outstanding issue here?

@dylkot
Copy link
Owner

dylkot commented Nov 13, 2020

This should all be fixed now. Cheers!

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