Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add compatible_with_equinox #77

Merged
merged 2 commits into from
Dec 11, 2024
Merged

add compatible_with_equinox #77

merged 2 commits into from
Dec 11, 2024

Conversation

chaoming0625
Copy link
Member

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 the Unit class.

This feature enable the diffrax no longer need modified equinox and optimisix.
See https://github.com/chaoming0625/diffrax

Compatibility improvements:

  • Added a global variable compat_with_equinox and a function compatible_with_equinox to enable or disable compatibility with Equinox. Updated the __pow__ method in the Quantity class to handle Equinox's internal _omega type. (brainunit/_base.py, [1] [2]

Code cleanup:

  • Removed redundant comments in the fail_for_dimension_mismatch and fail_for_unit_mismatch functions. (brainunit/_base.py, [1] [2]

Documentation updates:

  • Enhanced the Unit class documentation to include a mathematical representation of a unit. (brainunit/_base.py, brainunit/_base.pyL1276-R1293)
  • Corrected and clarified various comments and docstrings, including removing references to "Brian" and updating the list of available constants. (brainunit/_base.py, [1] [2]; brainunit/_unit_constants.py, [3] [4]

@chaoming0625 chaoming0625 merged commit 9c01dd9 into main Dec 11, 2024
16 checks passed
@chaoming0625 chaoming0625 deleted the update2 branch December 11, 2024 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant