You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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!
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 andaux
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.
The text was updated successfully, but these errors were encountered: