-
Notifications
You must be signed in to change notification settings - Fork 157
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
Passing extra arguments to heatmapf callable #180
Comments
Hello, I saw your post, implemented your changes to the base code and wanted some help or a clarification. I am trying to implement a function, similar to the "Shannon Entropy" example given in the basic documentation page. The only difference is that I pass two variables p, q to the function instead of only p (as in the Shannon). I do come across to the following error " missing 1 required positional argument: 'q' " . But if I leave out q, and return to the single value function everything seems to work. Any ideas? |
Hi, awesome! I've written a little example here of how I've been using it locally in my project,
So i just pass any additional arguments as a tuple, and pack them out inside the function. I'm a bit new to Github btw, so I didn't immediately see how i could link my pull request to this issue. |
You are a Top Guy, many thanks, now I understand your implementation! |
Thanks! Feel free to add the example to the docs, if you didn't understand it right away, most other people probably wont either :) |
Will certainly do! |
First of all i want to say this all looks great! I needed to pass some extra arguments to the function i was making a heatmap for, so i added it as a kwarg to the heatmapf function (same style as scipy.integrate.quad() and other functions that take in callables).
I think it would be a nice little addition to the library. Linking a pull request where I've implemented it.
The text was updated successfully, but these errors were encountered: