Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the
brainunit
package, focusing on compatibility improvements, code cleanup, and documentation updates. The most important changes include adding a compatibility mode with Equinox, cleaning up redundant comments, and enhancing the documentation for theUnit
class.This feature enable the diffrax no longer need modified
equinox
andoptimisix
.See https://github.com/chaoming0625/diffrax
Compatibility improvements:
compat_with_equinox
and a functioncompatible_with_equinox
to enable or disable compatibility with Equinox. Updated the__pow__
method in theQuantity
class to handle Equinox's internal_omega
type. (brainunit/_base.py
, [1] [2]Code cleanup:
fail_for_dimension_mismatch
andfail_for_unit_mismatch
functions. (brainunit/_base.py
, [1] [2]Documentation updates:
Unit
class documentation to include a mathematical representation of a unit. (brainunit/_base.py
, brainunit/_base.pyL1276-R1293)brainunit/_base.py
, [1] [2];brainunit/_unit_constants.py
, [3] [4]