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

Support auxiliary data #32

Open
quattro opened this issue Dec 11, 2024 · 1 comment
Open

Support auxiliary data #32

quattro opened this issue Dec 11, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@quattro
Copy link

quattro commented Dec 11, 2024

Hi! Awesome library.

I realize this may be a tall order, but it would be fantastic to allow for auxiliary data to be returned from user specified functions. This can useful for updating intermediate state objects. A good example is in optimistix.

I suppose it would also require users to specify some mapping function on how to combine two pytrees such that the end result would be value, aux = quadgk(func, interval, has_aux=True, tree_map_func=my_map_func) where value is the final integral and aux is the mapped (e.g., averaged, summed) auxiliary pytree.

I think one workaround now is that if aux is another array, I could concatenate them together and parse out afterwards.

@f0uriest
Copy link
Owner

I agree this would be nice to have but it's not something I'll likely be able to work on in the foreseeable future. That said I'd welcome any contributions!

@f0uriest f0uriest added the help wanted Extra attention is needed label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants