-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed