From 859acc5f113b1c3bc1ec5840eaf149bd2cdc4162 Mon Sep 17 00:00:00 2001 From: Chaoming Wang Date: Wed, 12 Jun 2024 22:36:23 +0800 Subject: [PATCH] fix imports --- brainunit/{math => }/_misc.py | 0 brainunit/math/_compat_numpy_array_creation.py | 2 +- brainunit/math/_compat_numpy_array_manipulation.py | 3 ++- 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 | 4 ++-- brainunit/math/_compat_numpy_funcs_indexing.py | 4 ++-- brainunit/math/_compat_numpy_funcs_keep_unit.py | 2 +- brainunit/math/_compat_numpy_funcs_logic.py | 4 ++-- brainunit/math/_compat_numpy_funcs_match_unit.py | 4 ++-- 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 +- brainunit/math/_others.py | 2 +- 16 files changed, 20 insertions(+), 19 deletions(-) rename brainunit/{math => }/_misc.py (100%) diff --git a/brainunit/math/_misc.py b/brainunit/_misc.py similarity index 100% rename from brainunit/math/_misc.py rename to brainunit/_misc.py diff --git a/brainunit/math/_compat_numpy_array_creation.py b/brainunit/math/_compat_numpy_array_creation.py index d904d80..2476adc 100644 --- a/brainunit/math/_compat_numpy_array_creation.py +++ b/brainunit/math/_compat_numpy_array_creation.py @@ -21,7 +21,7 @@ import numpy as np from jax import Array -from ._misc import set_module_as +from brainunit._misc import set_module_as from .._base import ( DIMENSIONLESS, Quantity, diff --git a/brainunit/math/_compat_numpy_array_manipulation.py b/brainunit/math/_compat_numpy_array_manipulation.py index 55e3a1e..6408b15 100644 --- a/brainunit/math/_compat_numpy_array_manipulation.py +++ b/brainunit/math/_compat_numpy_array_manipulation.py @@ -20,8 +20,9 @@ import jax.numpy as jnp from jax import Array -from ._misc import set_module_as +from brainunit._misc import set_module_as from .._base import Quantity + __all__ = [ # array manipulation 'reshape', 'moveaxis', 'transpose', 'swapaxes', 'row_stack', diff --git a/brainunit/math/_compat_numpy_funcs_accept_unitless.py b/brainunit/math/_compat_numpy_funcs_accept_unitless.py index 31b0b7a..4bb03e3 100644 --- a/brainunit/math/_compat_numpy_funcs_accept_unitless.py +++ b/brainunit/math/_compat_numpy_funcs_accept_unitless.py @@ -19,7 +19,7 @@ import jax.numpy as jnp from jax import Array -from _misc import set_module_as +from brainunit._misc import set_module_as from .._base import (Quantity, fail_for_dimension_mismatch, ) __all__ = [ diff --git a/brainunit/math/_compat_numpy_funcs_bit_operation.py b/brainunit/math/_compat_numpy_funcs_bit_operation.py index 0281bf2..65d9881 100644 --- a/brainunit/math/_compat_numpy_funcs_bit_operation.py +++ b/brainunit/math/_compat_numpy_funcs_bit_operation.py @@ -19,7 +19,7 @@ import numpy as np from jax import Array -from _misc import set_module_as +from brainunit._misc import set_module_as from .._base import Quantity __all__ = [ diff --git a/brainunit/math/_compat_numpy_funcs_change_unit.py b/brainunit/math/_compat_numpy_funcs_change_unit.py index 4547ca8..eb431e4 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 _misc import set_module_as +from brainunit._misc import set_module_as from ._compat_numpy_get_attribute import isscalar from .._base import (DIMENSIONLESS, - Quantity,) + Quantity, ) from .._base import _return_check_unitless __all__ = [ diff --git a/brainunit/math/_compat_numpy_funcs_indexing.py b/brainunit/math/_compat_numpy_funcs_indexing.py index dc4b1ae..bb84218 100644 --- a/brainunit/math/_compat_numpy_funcs_indexing.py +++ b/brainunit/math/_compat_numpy_funcs_indexing.py @@ -18,10 +18,10 @@ import jax.numpy as jnp import numpy as np -from _misc import set_module_as +from brainunit._misc import set_module_as from .._base import (Quantity, fail_for_dimension_mismatch, - is_unitless,) + is_unitless, ) __all__ = [ diff --git a/brainunit/math/_compat_numpy_funcs_keep_unit.py b/brainunit/math/_compat_numpy_funcs_keep_unit.py index 1288a58..0e56ec4 100644 --- a/brainunit/math/_compat_numpy_funcs_keep_unit.py +++ b/brainunit/math/_compat_numpy_funcs_keep_unit.py @@ -18,7 +18,7 @@ import jax.numpy as jnp import numpy as np -from _misc import set_module_as +from brainunit._misc import set_module_as from .._base import Quantity __all__ = [ diff --git a/brainunit/math/_compat_numpy_funcs_logic.py b/brainunit/math/_compat_numpy_funcs_logic.py index 51bd34f..9e985f3 100644 --- a/brainunit/math/_compat_numpy_funcs_logic.py +++ b/brainunit/math/_compat_numpy_funcs_logic.py @@ -19,9 +19,9 @@ import numpy as np from jax import Array -from _misc import set_module_as +from brainunit._misc import set_module_as from .._base import (Quantity, - fail_for_dimension_mismatch,) + fail_for_dimension_mismatch, ) __all__ = [ # logic funcs (unary) diff --git a/brainunit/math/_compat_numpy_funcs_match_unit.py b/brainunit/math/_compat_numpy_funcs_match_unit.py index c3bb7b5..e74b480 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 _misc import set_module_as +from brainunit._misc import set_module_as from .._base import (Quantity, - fail_for_dimension_mismatch,) + fail_for_dimension_mismatch, ) __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 3331554..034d721 100644 --- a/brainunit/math/_compat_numpy_funcs_remove_unit.py +++ b/brainunit/math/_compat_numpy_funcs_remove_unit.py @@ -17,7 +17,7 @@ import jax.numpy as jnp from jax import Array -from _misc import set_module_as +from brainunit._misc import set_module_as from .._base import Quantity __all__ = [ diff --git a/brainunit/math/_compat_numpy_funcs_window.py b/brainunit/math/_compat_numpy_funcs_window.py index c502a93..ae4df30 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 _misc import set_module_as +from brainunit._misc import set_module_as __all__ = [ diff --git a/brainunit/math/_compat_numpy_get_attribute.py b/brainunit/math/_compat_numpy_get_attribute.py index df639cd..1595191 100644 --- a/brainunit/math/_compat_numpy_get_attribute.py +++ b/brainunit/math/_compat_numpy_get_attribute.py @@ -18,7 +18,7 @@ import jax.numpy as jnp import numpy as np -from _misc import set_module_as +from brainunit._misc import set_module_as from .._base import Quantity __all__ = [ diff --git a/brainunit/math/_compat_numpy_linear_algebra.py b/brainunit/math/_compat_numpy_linear_algebra.py index cb5d5c9..a1ced94 100644 --- a/brainunit/math/_compat_numpy_linear_algebra.py +++ b/brainunit/math/_compat_numpy_linear_algebra.py @@ -17,7 +17,7 @@ import jax.numpy as jnp from jax import Array -from _misc import set_module_as +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 diff --git a/brainunit/math/_compat_numpy_misc.py b/brainunit/math/_compat_numpy_misc.py index d9b75c3..400dc5a 100644 --- a/brainunit/math/_compat_numpy_misc.py +++ b/brainunit/math/_compat_numpy_misc.py @@ -22,7 +22,7 @@ from jax import Array from jax._src.numpy.lax_numpy import _einsum -from _misc import set_module_as +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 diff --git a/brainunit/math/_others.py b/brainunit/math/_others.py index f20e1cb..1f086d6 100644 --- a/brainunit/math/_others.py +++ b/brainunit/math/_others.py @@ -15,7 +15,7 @@ import jax.numpy as jnp -from _misc import set_module_as +from brainunit._misc import set_module_as from ._compat_numpy_funcs_accept_unitless import funcs_only_accept_unitless_unary __all__ = [