Utilities¶
numerax.utils ¶
Utility functions for the numerax package.
preserve_metadata ¶
Wrapper that ensures a decorator preserves function metadata for documentation tools.
Overview¶
This is particularly useful for JAX decorators like @custom_jvp
that
create special objects which may not preserve __doc__
and other metadata
properly for documentation generators like pdoc.
Args¶
- decorator: The decorator function to wrap
Returns¶
A new decorator that preserves metadata