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

Current state of DynamicMap #705

Closed
vascotenner opened this issue Jun 3, 2016 · 5 comments
Closed

Current state of DynamicMap #705

vascotenner opened this issue Jun 3, 2016 · 5 comments
Assignees

Comments

@vascotenner
Copy link
Contributor

Is there an easy way to get the parameters of the showed item in a DynamicMap?

dmap.keys() of dmap.cache shows all the keys available in the cache, not the current selected frame.

When using ipython.widgets.interact, one can do: object.kwargs or something.

This addition would it also make it possible to easilier to save the last state of a widget in a notebook.

@jlstevens
Copy link
Contributor

I think this is a reasonable suggestion.

The attribute could be called args as that is how arguments are passed into the callback (if not a generator), following the key dimension order. We have some plans to use kwargs for something else in future...

@jlstevens
Copy link
Contributor

I've made a PR (linked above) to add an args attribute. I'll wait for @philippjfr to review it but first I better test it works as expected...

@jlstevens
Copy link
Contributor

It seems to work fine. I noticed one instance where the args didn't match the state of the sliders (a bit disturbing!) but I can't seem to reproduce that issue now...

@jlstevens
Copy link
Contributor

@vascotenner This should now be addressed by PR #1453 which has been merged.

You'll find an args and kwargs attribute on dmap.callback with the information you need. Closing.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants