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

Error cannot provide both bin centers and nb_bins, while only providing bin centers #67

Open
zozo19999 opened this issue May 5, 2023 · 1 comment

Comments

@zozo19999
Copy link

Hi,
I'm trying to use ne.metrics.MutualInformation, I provide the function only bin centers and not number of bins, and I receive the error "Error cannot provide both bin centers and nb_bins".

If I only provide the nb_bins parameter I don't receive this error.
My assumption for the root cause for the problem is in the class MutualInformation, when defining the bin_centers it redifines the number of bins by using nb_bins = bin_centers.shape[0] (line 95).
And when it runs self.quanitize (line 315) it sees that both nb_bins and bins_centers are not None and I receive this error.
Can please someone help, Maybe the script needs to be fixed?
err

@adalca
Copy link
Owner

adalca commented Jun 13, 2023

Sorry i am seeing this late. I think the problem is that soft_quantize has a default of nb_bins =16, no? Can you force-set this to None? This is probably bad design on our part

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

2 participants