Open ashton314 opened 1 year ago
Concretely:
track(x)
to traverse the array x
and replace all floats with TFs. Use TrackedFloat64
as the default but allow changes.@track foo(...)
to replace all Float-like types in the function signature with TFIs 2 needed? I'm thinking no, because TF is a subtype of the matching floats and the type alone doesn't do any converting. (foo(4.2)
would be an error).
I think it'd be neat for 2 if we could hijack the original function so if it gets called with non-TrackedFloats, we wrap it and then call again.
Yes, that'd be great! Just like a Python decorator.
Per discussion on RXInfer.jl#116 it would be nice to have some functions to make it easier to wrap inputs in the
TrackedFloat
type.