From c4722cfb5880f9800811bbb4cdfa9809eac841ce Mon Sep 17 00:00:00 2001 From: Chaoming Wang Date: Fri, 14 Jun 2024 15:39:14 +0800 Subject: [PATCH] update imports --- brainunit/math/_compat_numpy_array_creation.py | 2 +- brainunit/math/_compat_numpy_array_manipulation.py | 2 +- brainunit/math/_compat_numpy_funcs_accept_unitless.py | 2 +- brainunit/math/_compat_numpy_funcs_bit_operation.py | 2 +- brainunit/math/_compat_numpy_funcs_change_unit.py | 2 +- brainunit/math/_compat_numpy_funcs_indexing.py | 2 +- brainunit/math/_compat_numpy_funcs_keep_unit.py | 2 +- brainunit/math/_compat_numpy_funcs_match_unit.py | 2 +- brainunit/math/_compat_numpy_funcs_remove_unit.py | 2 +- brainunit/math/_compat_numpy_funcs_window.py | 2 +- brainunit/math/_compat_numpy_get_attribute.py | 2 +- brainunit/math/_compat_numpy_linear_algebra.py | 2 +- brainunit/math/_compat_numpy_misc.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/brainunit/math/_compat_numpy_array_creation.py b/brainunit/math/_compat_numpy_array_creation.py index 429e73a..be20b91 100644 --- a/brainunit/math/_compat_numpy_array_creation.py +++ b/brainunit/math/_compat_numpy_array_creation.py @@ -21,7 +21,6 @@ import numpy as np from jax import Array -from brainunit._misc import set_module_as from .._base import ( DIMENSIONLESS, Quantity, @@ -29,6 +28,7 @@ fail_for_dimension_mismatch, is_unitless, ) +from .._misc import set_module_as __all__ = [ # array creation diff --git a/brainunit/math/_compat_numpy_array_manipulation.py b/brainunit/math/_compat_numpy_array_manipulation.py index fdf0fcb..dcaed15 100644 --- a/brainunit/math/_compat_numpy_array_manipulation.py +++ b/brainunit/math/_compat_numpy_array_manipulation.py @@ -21,8 +21,8 @@ from jax import Array from jax.tree_util import tree_map -from brainunit._misc import set_module_as from .._base import Quantity +from .._misc import set_module_as __all__ = [ # array manipulation diff --git a/brainunit/math/_compat_numpy_funcs_accept_unitless.py b/brainunit/math/_compat_numpy_funcs_accept_unitless.py index 81d25a8..af97ef5 100644 --- a/brainunit/math/_compat_numpy_funcs_accept_unitless.py +++ b/brainunit/math/_compat_numpy_funcs_accept_unitless.py @@ -19,8 +19,8 @@ import jax.numpy as jnp from jax import Array -from brainunit._misc import set_module_as from .._base import (Quantity, fail_for_dimension_mismatch, ) +from .._misc import set_module_as __all__ = [ # math funcs only accept unitless (unary) diff --git a/brainunit/math/_compat_numpy_funcs_bit_operation.py b/brainunit/math/_compat_numpy_funcs_bit_operation.py index a0efc25..7ccb523 100644 --- a/brainunit/math/_compat_numpy_funcs_bit_operation.py +++ b/brainunit/math/_compat_numpy_funcs_bit_operation.py @@ -19,8 +19,8 @@ import numpy as np from jax import Array -from brainunit._misc import set_module_as from .._base import Quantity +from .._misc import set_module_as __all__ = [ # Elementwise bit operations (unary) diff --git a/brainunit/math/_compat_numpy_funcs_change_unit.py b/brainunit/math/_compat_numpy_funcs_change_unit.py index 614308f..59bab36 100644 --- a/brainunit/math/_compat_numpy_funcs_change_unit.py +++ b/brainunit/math/_compat_numpy_funcs_change_unit.py @@ -19,10 +19,10 @@ import jax.numpy as jnp import numpy as np -from brainunit._misc import set_module_as from ._compat_numpy_get_attribute import isscalar from .._base import (DIMENSIONLESS, Quantity, ) from .._base import _return_check_unitless +from .._misc import set_module_as __all__ = [ diff --git a/brainunit/math/_compat_numpy_funcs_indexing.py b/brainunit/math/_compat_numpy_funcs_indexing.py index f141632..6657417 100644 --- a/brainunit/math/_compat_numpy_funcs_indexing.py +++ b/brainunit/math/_compat_numpy_funcs_indexing.py @@ -18,8 +18,8 @@ import jax.numpy as jnp import numpy as np -from brainunit._misc import set_module_as from .._base import (Quantity, fail_for_dimension_mismatch, is_unitless, ) +from .._misc import set_module_as __all__ = [ # indexing funcs diff --git a/brainunit/math/_compat_numpy_funcs_keep_unit.py b/brainunit/math/_compat_numpy_funcs_keep_unit.py index 07f9f2a..58c7153 100644 --- a/brainunit/math/_compat_numpy_funcs_keep_unit.py +++ b/brainunit/math/_compat_numpy_funcs_keep_unit.py @@ -18,8 +18,8 @@ import jax.numpy as jnp import numpy as np -from brainunit._misc import set_module_as from .._base import Quantity, fail_for_dimension_mismatch +from .._misc import set_module_as __all__ = [ # math funcs keep unit (unary) diff --git a/brainunit/math/_compat_numpy_funcs_match_unit.py b/brainunit/math/_compat_numpy_funcs_match_unit.py index 3872823..deafa01 100644 --- a/brainunit/math/_compat_numpy_funcs_match_unit.py +++ b/brainunit/math/_compat_numpy_funcs_match_unit.py @@ -19,9 +19,9 @@ import numpy as np from jax import Array -from brainunit._misc import set_module_as from .._base import (Quantity, fail_for_dimension_mismatch, ) +from .._misc import set_module_as __all__ = [ # math funcs match unit (binary) diff --git a/brainunit/math/_compat_numpy_funcs_remove_unit.py b/brainunit/math/_compat_numpy_funcs_remove_unit.py index f2f21ec..b10f89b 100644 --- a/brainunit/math/_compat_numpy_funcs_remove_unit.py +++ b/brainunit/math/_compat_numpy_funcs_remove_unit.py @@ -18,8 +18,8 @@ import jax.numpy as jnp from jax import Array -from brainunit._misc import set_module_as from .._base import Quantity +from .._misc import set_module_as __all__ = [ diff --git a/brainunit/math/_compat_numpy_funcs_window.py b/brainunit/math/_compat_numpy_funcs_window.py index 0be3fcf..b79fa01 100644 --- a/brainunit/math/_compat_numpy_funcs_window.py +++ b/brainunit/math/_compat_numpy_funcs_window.py @@ -16,7 +16,7 @@ import jax.numpy as jnp from jax import Array -from brainunit._misc import set_module_as +from .._misc import set_module_as __all__ = [ # window funcs diff --git a/brainunit/math/_compat_numpy_get_attribute.py b/brainunit/math/_compat_numpy_get_attribute.py index 1595191..10fc71a 100644 --- a/brainunit/math/_compat_numpy_get_attribute.py +++ b/brainunit/math/_compat_numpy_get_attribute.py @@ -18,8 +18,8 @@ import jax.numpy as jnp import numpy as np -from brainunit._misc import set_module_as from .._base import Quantity +from .._misc import set_module_as __all__ = [ # getting attribute funcs diff --git a/brainunit/math/_compat_numpy_linear_algebra.py b/brainunit/math/_compat_numpy_linear_algebra.py index da47178..05ad3c8 100644 --- a/brainunit/math/_compat_numpy_linear_algebra.py +++ b/brainunit/math/_compat_numpy_linear_algebra.py @@ -18,10 +18,10 @@ import jax.numpy as jnp from jax import Array -from brainunit._misc import set_module_as from ._compat_numpy_funcs_change_unit import funcs_change_unit_binary from ._compat_numpy_funcs_keep_unit import funcs_keep_unit_unary from .._base import Quantity +from .._misc import set_module_as __all__ = [ diff --git a/brainunit/math/_compat_numpy_misc.py b/brainunit/math/_compat_numpy_misc.py index dab1427..10e4896 100644 --- a/brainunit/math/_compat_numpy_misc.py +++ b/brainunit/math/_compat_numpy_misc.py @@ -25,7 +25,6 @@ from jax import Array from jax._src.numpy.lax_numpy import _einsum -from brainunit._misc import set_module_as from ._compat_numpy_array_manipulation import func_array_manipulation from ._compat_numpy_funcs_change_unit import funcs_change_unit_binary from ._compat_numpy_funcs_keep_unit import funcs_keep_unit_unary @@ -34,6 +33,7 @@ fail_for_dimension_mismatch, is_unitless, get_dim, ) +from .._misc import set_module_as __all__ = [