Symbolics v7.0.0
Breaking changes
This version updates Symbolics.jl to use SymbolicUtils.jl's new v4 release. A large part of the array semantics have been moved to SymbolicUtils.
- Due to the new
Constvariant ofBasicSymbolic,NumandArrboth wrapBasicSymbolic{SymReal}.unwrapreturns the containedBasicSymbolic. This is in contrast to the previous behavior, where the wrapped value was::Anyandunwrapwould return either aNumber/array or the symbolic.Symbolics.valuerecovers this behavior. While previously it was an alias forunwrap, now it is an alias forunwrap_const(unwrap(x)). - ArrayOp is moved to SymbolicUtils. ArrayMaker have been temporarily removed and will be revived in SymbolicUtils.
- The
@register_array_symbolicmacro now has a soft requirement to specify thendimsof the result for improved correctness guarantees. - Custom derivative rules for registered functions used to be defined by adding methods to
Symbolics.derivative. This behavior is now removed in favor of using the@register_derivativemacro. Querying the rules requires using the@derivative_rulemacro. A non-macro workflow may be exposed in the future. Symbolics.CallWithMetadatais now removed. Callable symbolics now always transfer metadata to the result.CallAndWrapis added, which wraps the result of calling the innerBasicSymbolicin the appropriate wrapper type (Num/Arr).
For further information it is highly recommended to refer to the documentation for SymbolicUtils.jl at https://docs.sciml.ai/SymbolicUtils/stable/ and specifically the page on the new variant structure.
Merged pull requests:
- [BREAKING] feat: update to SymbolicUtils@4 (#1649) (@AayushSabharwal)
- fix: fix
getnameon array symbolic functions with interpolated names (#1673) (@AayushSabharwal) - fix: fix latexification of equations (#1677) (@AayushSabharwal)
Closed issues:
- WARNING: Code.get_symbolify is deprecated, use get_rewrites instead. (#918)