brainunit.compatible_with_equinox#
- brainunit.compatible_with_equinox(mode=True)[source]#
Enable or disable compatibility with the Equinox library.
When enabled,
Quantityobjects interact correctly with Equinox transformations such as those used in unit-aware diffrax.- Parameters:
mode (
bool) – IfTrue(default), enable Equinox compatibility. IfFalse, disable it.
Examples
>>> import saiunit as u >>> u.compatible_with_equinox(True) # enable >>> u.compatible_with_equinox(False) # disable
See also
QuantityThe core physical-quantity class affected by this setting.