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

Add argument to accessor functions to ignore subsystems #3459

Open
TorkelE opened this issue Mar 14, 2025 · 1 comment
Open

Add argument to accessor functions to ignore subsystems #3459

TorkelE opened this issue Mar 14, 2025 · 1 comment

Comments

@TorkelE
Copy link
Member

TorkelE commented Mar 14, 2025

E.g. parameters gives a systems all parameters. However, often, it is useful to only get the parameters of a specific system, while ignoring subsystems.

Would it be possible to have a toplevel_only kwarg to these to ignore subsystems (basically replicating get_ps, but something users can use).

I could probably do these implementations in a PR myself, but would want to check with people first if there is any more input.

@ChrisRackauckas
Copy link
Member

Yes, it would be good to not expose get_xxxx accessors as much, because they are just getfield calls and so they are a much lower level utility. Giving more options to the standard accessors would be a much better API to document and maintain.

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