brainunit 0.1.3__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {brainunit-0.1.3 → brainunit-0.2.0}/PKG-INFO +3 -2
  2. brainunit-0.2.0/brainunit/__init__.py +155 -0
  3. brainunit-0.2.0/brainunit/_base_decorators.py +19 -0
  4. brainunit-0.2.0/brainunit/_base_dimension.py +19 -0
  5. brainunit-0.2.0/brainunit/_base_getters.py +19 -0
  6. brainunit-0.2.0/brainunit/_base_quantity.py +19 -0
  7. brainunit-0.1.3/brainunit/_base.py → brainunit-0.2.0/brainunit/_base_unit.py +3 -4
  8. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/_celsius.py +1 -1
  9. brainunit-0.2.0/brainunit/_misc.py +17 -0
  10. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/_unit_common.py +1 -1
  11. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/_unit_constants.py +1 -1
  12. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/_unit_shortcuts.py +1 -1
  13. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/autograd/__init__.py +1 -1
  14. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/autograd/_hessian.py +1 -1
  15. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/autograd/_jacobian.py +1 -1
  16. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/autograd/_value_and_grad.py +1 -1
  17. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/autograd/_vector_grad.py +1 -1
  18. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/constants.py +1 -1
  19. brainunit-0.2.0/brainunit/custom_array.py +18 -0
  20. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/fft/__init__.py +1 -1
  21. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/fft/_fft_change_unit.py +1 -1
  22. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/fft/_fft_keep_unit.py +1 -1
  23. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/lax/__init__.py +1 -1
  24. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/lax/_lax_accept_unitless.py +1 -1
  25. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/lax/_lax_array_creation.py +1 -1
  26. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/lax/_lax_change_unit.py +1 -1
  27. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/lax/_lax_keep_unit.py +1 -1
  28. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/lax/_lax_linalg.py +1 -1
  29. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/lax/_lax_remove_unit.py +1 -1
  30. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/lax/_misc.py +1 -1
  31. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/linalg/__init__.py +1 -1
  32. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/linalg/_linalg_change_unit.py +1 -1
  33. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/linalg/_linalg_keep_unit.py +1 -1
  34. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/linalg/_linalg_remove_unit.py +1 -1
  35. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/__init__.py +1 -1
  36. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/_activation.py +1 -1
  37. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/_alias.py +1 -1
  38. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/_einops.py +1 -1
  39. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/_fun_accept_unitless.py +1 -1
  40. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/_fun_array_creation.py +1 -1
  41. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/_fun_change_unit.py +1 -1
  42. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/_fun_keep_unit.py +1 -1
  43. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/_fun_remove_unit.py +1 -1
  44. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/_misc.py +1 -1
  45. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/fft.py +1 -1
  46. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/math/linalg.py +1 -1
  47. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/sparse/__init__.py +1 -1
  48. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/sparse/_block_csr.py +1 -1
  49. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/sparse/_block_ell.py +1 -1
  50. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/sparse/_coo.py +1 -1
  51. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit/sparse/_csr.py +1 -1
  52. brainunit-0.2.0/brainunit/typing.py +17 -0
  53. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit.egg-info/PKG-INFO +3 -2
  54. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit.egg-info/SOURCES.txt +8 -1
  55. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit.egg-info/requires.txt +2 -1
  56. {brainunit-0.1.3 → brainunit-0.2.0}/pyproject.toml +3 -3
  57. brainunit-0.1.3/brainunit/__init__.py +0 -65
  58. {brainunit-0.1.3 → brainunit-0.2.0}/README.md +0 -0
  59. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit.egg-info/dependency_links.txt +0 -0
  60. {brainunit-0.1.3 → brainunit-0.2.0}/brainunit.egg-info/top_level.txt +0 -0
  61. {brainunit-0.1.3 → brainunit-0.2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: brainunit
3
- Version: 0.1.3
3
+ Version: 0.2.0
4
4
  Summary: Physical Units and Unit-Aware Mathematical System for General-Purpose Brain Dynamics Modeling
5
5
  Author-email: BrainUnit Developers <chao.brain@qq.com>
6
6
  License-Expression: Apache-2.0
@@ -30,9 +30,10 @@ Requires-Python: >=3.10
30
30
  Description-Content-Type: text/markdown
31
31
  Requires-Dist: numpy
32
32
  Requires-Dist: typing_extensions
33
- Requires-Dist: saiunit==0.1.3
33
+ Requires-Dist: saiunit==0.2.0
34
34
  Provides-Extra: testing
35
35
  Requires-Dist: pytest; extra == "testing"
36
+ Requires-Dist: brainstate; extra == "testing"
36
37
  Provides-Extra: cpu
37
38
  Requires-Dist: jax[cpu]; extra == "cpu"
38
39
  Provides-Extra: cuda12
@@ -0,0 +1,155 @@
1
+ # Copyright 2024 BrainX Ecosystem Limited. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+
16
+ import saiunit
17
+ __version__ = saiunit.__version__
18
+ __version_info__ = saiunit.__version_info__
19
+
20
+ from . import autograd
21
+ from . import constants
22
+ from . import fft
23
+ from . import lax
24
+ from . import linalg
25
+ from . import math
26
+ from . import sparse
27
+ from . import typing
28
+ from ._base_decorators import assign_units, check_dims, check_units
29
+ from ._base_dimension import (
30
+ DIMENSIONLESS,
31
+ Dimension,
32
+ DimensionMismatchError,
33
+ UnitMismatchError,
34
+ get_dim_for_display,
35
+ get_or_create_dimension,
36
+ )
37
+ from ._base_getters import (
38
+ array_with_unit,
39
+ assert_quantity,
40
+ display_in_unit,
41
+ fail_for_dimension_mismatch,
42
+ fail_for_unit_mismatch,
43
+ get_dim,
44
+ get_magnitude,
45
+ get_mantissa,
46
+ get_unit,
47
+ has_same_unit,
48
+ have_same_dim,
49
+ is_dimensionless,
50
+ is_scalar_type,
51
+ is_unitless,
52
+ maybe_decimal,
53
+ split_mantissa_unit,
54
+ unit_scale_align_to_first,
55
+ )
56
+ from ._base_quantity import Quantity, compatible_with_equinox
57
+ from ._base_unit import UNITLESS, Unit, add_standard_unit, parse_unit
58
+ from ._celsius import celsius2kelvin, kelvin2celsius
59
+ from ._misc import maybe_custom_array, maybe_custom_array_tree
60
+ from ._unit_common import *
61
+ from ._unit_common import __all__ as _common_all
62
+ from ._unit_constants import *
63
+ from ._unit_constants import __all__ as _constants_all
64
+ from ._unit_shortcuts import *
65
+ from ._unit_shortcuts import __all__ as _std_units_all
66
+ from .custom_array import CustomArray
67
+
68
+ # old version compatibility
69
+ avogadro_constant = constants.avogadro
70
+ boltzmann_constant = constants.boltzmann
71
+ electric_constant = constants.electric
72
+ electron_mass = constants.electron_mass
73
+ elementary_charge = constants.elementary_charge
74
+ faraday_constant = constants.faraday
75
+ gas_constant = constants.gas
76
+ magnetic_constant = constants.magnetic
77
+ molar_mass_constant = constants.molar_mass
78
+
79
+ __all__ = [
80
+ # version control
81
+ '__version__',
82
+ '__version_info__',
83
+
84
+ # submodules
85
+ 'math',
86
+ 'linalg',
87
+ 'autograd',
88
+ 'fft',
89
+ 'constants',
90
+ 'sparse',
91
+ 'typing',
92
+
93
+ # misc
94
+ 'maybe_custom_array',
95
+ 'maybe_custom_array_tree',
96
+ 'CustomArray',
97
+
98
+ # _base_dimension
99
+ 'Dimension',
100
+ 'DIMENSIONLESS',
101
+ 'DimensionMismatchError',
102
+ 'UnitMismatchError',
103
+ 'get_or_create_dimension',
104
+ 'get_dim_for_display',
105
+
106
+ # _base_unit
107
+ 'Unit',
108
+ 'UNITLESS',
109
+ 'add_standard_unit',
110
+ 'parse_unit',
111
+
112
+ # _base_getters
113
+ 'is_dimensionless',
114
+ 'is_unitless',
115
+ 'is_scalar_type',
116
+ 'get_dim',
117
+ 'get_unit',
118
+ 'get_mantissa',
119
+ 'get_magnitude',
120
+ 'display_in_unit',
121
+ 'split_mantissa_unit',
122
+ 'maybe_decimal',
123
+ 'fail_for_dimension_mismatch',
124
+ 'fail_for_unit_mismatch',
125
+ 'assert_quantity',
126
+ 'have_same_dim',
127
+ 'has_same_unit',
128
+ 'unit_scale_align_to_first',
129
+ 'array_with_unit',
130
+
131
+ # _base_quantity
132
+ 'Quantity',
133
+ 'compatible_with_equinox',
134
+
135
+ # _base_decorators
136
+ 'check_dims',
137
+ 'check_units',
138
+ 'assign_units',
139
+
140
+ # _celsius
141
+ 'celsius2kelvin',
142
+ 'kelvin2celsius',
143
+
144
+ # old version compatibility
145
+ 'avogadro_constant',
146
+ 'boltzmann_constant',
147
+ 'electric_constant',
148
+ 'electron_mass',
149
+ 'elementary_charge',
150
+ 'faraday_constant',
151
+ 'gas_constant',
152
+ 'magnetic_constant',
153
+ 'molar_mass_constant',
154
+ ] + _common_all + _std_units_all + _constants_all
155
+ del _common_all, _std_units_all, _constants_all, saiunit
@@ -0,0 +1,19 @@
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+
16
+ # -*- coding: utf-8 -*-
17
+
18
+ from saiunit._base_decorators import *
19
+ from saiunit._base_decorators import __all__
@@ -0,0 +1,19 @@
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+
16
+ # -*- coding: utf-8 -*-
17
+
18
+ from saiunit._base_dimension import *
19
+ from saiunit._base_dimension import __all__
@@ -0,0 +1,19 @@
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+
16
+ # -*- coding: utf-8 -*-
17
+
18
+ from saiunit._base_getters import *
19
+ from saiunit._base_getters import __all__
@@ -0,0 +1,19 @@
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+
16
+ # -*- coding: utf-8 -*-
17
+
18
+ from saiunit._base_quantity import *
19
+ from saiunit._base_quantity import __all__
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,6 +15,5 @@
15
15
 
16
16
  # -*- coding: utf-8 -*-
17
17
 
18
- from saiunit._base import *
19
- from saiunit._base import __all__
20
-
18
+ from saiunit._base_unit import *
19
+ from saiunit._base_unit import __all__
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -0,0 +1,17 @@
1
+ # Copyright 2026 BrainX Ecosystem Limited. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+
16
+ from saiunit._misc import *
17
+ from saiunit._misc import __all__
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2024 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2024 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -0,0 +1,18 @@
1
+ # Copyright 2026 BrainX Ecosystem Limited. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+
16
+ from saiunit.custom_array import CustomArray
17
+ from saiunit.custom_array import __all__
18
+
@@ -1,4 +1,4 @@
1
- # Copyright 2024 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2024 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2024 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2024 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2024 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2024 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2024 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2024 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2024 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2024 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2025 BDP Ecosystem Limited. All Rights Reserved.
1
+ # Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -0,0 +1,17 @@
1
+ # Copyright 2026 BrainX Ecosystem Limited. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+
16
+ from saiunit.typing import *
17
+ from saiunit.typing import __all__
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: brainunit
3
- Version: 0.1.3
3
+ Version: 0.2.0
4
4
  Summary: Physical Units and Unit-Aware Mathematical System for General-Purpose Brain Dynamics Modeling
5
5
  Author-email: BrainUnit Developers <chao.brain@qq.com>
6
6
  License-Expression: Apache-2.0
@@ -30,9 +30,10 @@ Requires-Python: >=3.10
30
30
  Description-Content-Type: text/markdown
31
31
  Requires-Dist: numpy
32
32
  Requires-Dist: typing_extensions
33
- Requires-Dist: saiunit==0.1.3
33
+ Requires-Dist: saiunit==0.2.0
34
34
  Provides-Extra: testing
35
35
  Requires-Dist: pytest; extra == "testing"
36
+ Requires-Dist: brainstate; extra == "testing"
36
37
  Provides-Extra: cpu
37
38
  Requires-Dist: jax[cpu]; extra == "cpu"
38
39
  Provides-Extra: cuda12
@@ -1,12 +1,19 @@
1
1
  README.md
2
2
  pyproject.toml
3
3
  brainunit/__init__.py
4
- brainunit/_base.py
4
+ brainunit/_base_decorators.py
5
+ brainunit/_base_dimension.py
6
+ brainunit/_base_getters.py
7
+ brainunit/_base_quantity.py
8
+ brainunit/_base_unit.py
5
9
  brainunit/_celsius.py
10
+ brainunit/_misc.py
6
11
  brainunit/_unit_common.py
7
12
  brainunit/_unit_constants.py
8
13
  brainunit/_unit_shortcuts.py
9
14
  brainunit/constants.py
15
+ brainunit/custom_array.py
16
+ brainunit/typing.py
10
17
  brainunit.egg-info/PKG-INFO
11
18
  brainunit.egg-info/SOURCES.txt
12
19
  brainunit.egg-info/dependency_links.txt
@@ -1,6 +1,6 @@
1
1
  numpy
2
2
  typing_extensions
3
- saiunit==0.1.3
3
+ saiunit==0.2.0
4
4
 
5
5
  [cpu]
6
6
  jax[cpu]
@@ -13,6 +13,7 @@ jax[cuda13]
13
13
 
14
14
  [testing]
15
15
  pytest
16
+ brainstate
16
17
 
17
18
  [tpu]
18
19
  jax[tpu]
@@ -16,7 +16,7 @@ exclude = [
16
16
 
17
17
  [project]
18
18
  name = "brainunit"
19
- version = "0.1.3"
19
+ version = "0.2.0"
20
20
  description = "Physical Units and Unit-Aware Mathematical System for General-Purpose Brain Dynamics Modeling"
21
21
  readme = 'README.md'
22
22
  license = 'Apache-2.0'
@@ -48,7 +48,7 @@ keywords = ['physical unit', 'physical quantity', 'brain modeling']
48
48
  dependencies = [
49
49
  'numpy',
50
50
  'typing_extensions',
51
- 'saiunit==0.1.3',
51
+ 'saiunit==0.2.0',
52
52
  ]
53
53
 
54
54
  [tool.flit.module]
@@ -61,7 +61,7 @@ repository = 'https://github.com/chaobrain/brainunit'
61
61
  "Documentation" = "https://brainunit.readthedocs.io/"
62
62
 
63
63
  [project.optional-dependencies]
64
- testing = ["pytest"]
64
+ testing = ["pytest", "brainstate"]
65
65
  cpu = ["jax[cpu]"]
66
66
  cuda12 = ["jax[cuda12]"]
67
67
  cuda13 = ["jax[cuda13]"]
@@ -1,65 +0,0 @@
1
- # Copyright 2024 BDP Ecosystem Limited. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- # ==============================================================================
15
-
16
-
17
- import saiunit
18
-
19
- __version__ = saiunit.__version__
20
- __version_info__ = tuple(map(int, __version__.split(".")))
21
-
22
- from . import autograd
23
- from . import constants
24
- from . import fft
25
- from . import lax
26
- from . import linalg
27
- from . import math
28
- from . import sparse
29
- from ._base import *
30
- from ._base import __all__ as _base_all
31
- from ._celsius import *
32
- from ._celsius import __all__ as _celsius_all
33
- from ._unit_common import *
34
- from ._unit_common import __all__ as _common_all
35
- from ._unit_constants import *
36
- from ._unit_constants import __all__ as _constants_all
37
- from ._unit_shortcuts import *
38
- from ._unit_shortcuts import __all__ as _std_units_all
39
- from saiunit.custom_array import CustomArray
40
- from saiunit._misc import maybe_custom_array, maybe_custom_array_tree
41
-
42
- __all__ = [
43
- 'math',
44
- 'linalg',
45
- 'autograd',
46
- 'fft',
47
- 'constants',
48
- 'sparse',
49
- 'CustomArray',
50
- 'maybe_custom_array',
51
- 'maybe_custom_array_tree',
52
- ]
53
- __all__ = __all__ + _common_all + _std_units_all + _base_all + _constants_all + _celsius_all
54
- del _common_all, _std_units_all, _base_all, _celsius_all, _constants_all, saiunit
55
-
56
- # old version compatibility
57
- avogadro_constant = constants.avogadro
58
- boltzmann_constant = constants.boltzmann
59
- electric_constant = constants.electric
60
- electron_mass = constants.electron_mass
61
- elementary_charge = constants.elementary_charge
62
- faraday_constant = constants.faraday
63
- gas_constant = constants.gas
64
- magnetic_constant = constants.magnetic
65
- molar_mass_constant = constants.molar_mass
File without changes
File without changes