Skip to content

Commit

Permalink
Include the conversion factor in a Unit (#78)
Browse files Browse the repository at this point in the history
* add `factor` attribute in `Unit`

* enable mathematical functions support `factor` in `Unit`

* add molecular dynamics units using `factor` of `Unit`

* `Unit.factorless` is always correct

* add more constant units

* fix test bugs

* fix test bugs
  • Loading branch information
chaoming0625 authored Dec 11, 2024
1 parent 9c01dd9 commit 4f33522
Show file tree
Hide file tree
Showing 17 changed files with 2,311 additions and 1,665 deletions.
19 changes: 14 additions & 5 deletions brainunit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,30 @@
__version__ = "0.0.3"

from . import _matplotlib_compat
from . import lax
from . import math
from . import linalg
from . import autograd
from . import constants
from . import fft
from . import lax
from . import linalg
from . import math
from ._base import *
from ._base import __all__ as _base_all
from ._celsius import *
from ._celsius import __all__ as _celsius_all
from ._unit_common import *
from ._unit_common import __all__ as _common_all
from ._unit_constants import *
from ._unit_constants import __all__ as _constants_all
from ._unit_shortcuts import *
from ._unit_shortcuts import __all__ as _std_units_all
from .constants import *
from .constants import __all__ as _constants_all

__all__ = ['math', 'linalg', 'autograd', 'fft'] + _common_all + _std_units_all + _constants_all + _base_all + _celsius_all
__all__ = (
['math', 'linalg', 'autograd', 'fft', 'constants'] +
_common_all +
_std_units_all +
_constants_all +
_base_all +
_celsius_all
)
del _common_all, _std_units_all, _constants_all, _base_all, _celsius_all, _matplotlib_compat
Loading

0 comments on commit 4f33522

Please sign in to comment.