brainstate 0.1.10__tar.gz → 0.2.1__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 (201) hide show
  1. {brainstate-0.1.10 → brainstate-0.2.1}/LICENSE +202 -202
  2. {brainstate-0.1.10 → brainstate-0.2.1}/PKG-INFO +108 -91
  3. {brainstate-0.1.10 → brainstate-0.2.1}/README.md +49 -49
  4. brainstate-0.2.1/brainstate/__init__.py +169 -0
  5. brainstate-0.2.1/brainstate/_compatible_import.py +340 -0
  6. brainstate-0.2.1/brainstate/_compatible_import_test.py +681 -0
  7. brainstate-0.2.1/brainstate/_deprecation.py +210 -0
  8. brainstate-0.2.1/brainstate/_deprecation_test.py +2319 -0
  9. brainstate-0.1.10/brainstate/util/error.py → brainstate-0.2.1/brainstate/_error.py +45 -55
  10. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/_state.py +1652 -1605
  11. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/_state_test.py +52 -52
  12. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/_utils.py +47 -47
  13. brainstate-0.2.1/brainstate/environ.py +1495 -0
  14. brainstate-0.2.1/brainstate/environ_test.py +1223 -0
  15. brainstate-0.1.10/brainstate/transform.py → brainstate-0.2.1/brainstate/graph/__init__.py +22 -23
  16. brainstate-0.2.1/brainstate/graph/_node.py +240 -0
  17. brainstate-0.2.1/brainstate/graph/_node_test.py +589 -0
  18. brainstate-0.1.10/brainstate/graph/_graph_operation.py → brainstate-0.2.1/brainstate/graph/_operation.py +1624 -1738
  19. brainstate-0.2.1/brainstate/graph/_operation_test.py +1147 -0
  20. brainstate-0.2.1/brainstate/mixin.py +1433 -0
  21. brainstate-0.2.1/brainstate/mixin_test.py +1017 -0
  22. brainstate-0.2.1/brainstate/nn/__init__.py +137 -0
  23. brainstate-0.2.1/brainstate/nn/_activations.py +1100 -0
  24. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/nn/_activations_test.py +354 -331
  25. brainstate-0.2.1/brainstate/nn/_collective_ops.py +633 -0
  26. brainstate-0.2.1/brainstate/nn/_collective_ops_test.py +774 -0
  27. brainstate-0.2.1/brainstate/nn/_common.py +226 -0
  28. brainstate-0.2.1/brainstate/nn/_common_test.py +154 -0
  29. brainstate-0.2.1/brainstate/nn/_conv.py +2010 -0
  30. brainstate-0.2.1/brainstate/nn/_conv_test.py +849 -0
  31. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/nn/_delay.py +575 -588
  32. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/nn/_delay_test.py +243 -238
  33. brainstate-0.2.1/brainstate/nn/_dropout.py +618 -0
  34. brainstate-0.2.1/brainstate/nn/_dropout_test.py +477 -0
  35. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/nn/_dynamics.py +1267 -1343
  36. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/nn/_dynamics_test.py +67 -78
  37. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/nn/_elementwise.py +1298 -1119
  38. brainstate-0.2.1/brainstate/nn/_elementwise_test.py +830 -0
  39. brainstate-0.2.1/brainstate/nn/_embedding.py +408 -0
  40. brainstate-0.2.1/brainstate/nn/_embedding_test.py +156 -0
  41. brainstate-0.1.10/brainstate/nn/_fixedprob.py → brainstate-0.2.1/brainstate/nn/_event_fixedprob.py +233 -239
  42. brainstate-0.1.10/brainstate/nn/_fixedprob_test.py → brainstate-0.2.1/brainstate/nn/_event_fixedprob_test.py +115 -114
  43. brainstate-0.1.10/brainstate/nn/_linear_mv.py → brainstate-0.2.1/brainstate/nn/_event_linear.py +83 -83
  44. brainstate-0.1.10/brainstate/nn/_linear_mv_test.py → brainstate-0.2.1/brainstate/nn/_event_linear_test.py +121 -120
  45. brainstate-0.2.1/brainstate/nn/_exp_euler.py +254 -0
  46. brainstate-0.2.1/brainstate/nn/_exp_euler_test.py +377 -0
  47. brainstate-0.2.1/brainstate/nn/_linear.py +744 -0
  48. brainstate-0.2.1/brainstate/nn/_linear_test.py +475 -0
  49. brainstate-0.2.1/brainstate/nn/_metrics.py +1070 -0
  50. brainstate-0.2.1/brainstate/nn/_metrics_test.py +611 -0
  51. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/nn/_module.py +384 -377
  52. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/nn/_module_test.py +40 -40
  53. brainstate-0.2.1/brainstate/nn/_normalizations.py +1334 -0
  54. brainstate-0.2.1/brainstate/nn/_normalizations_test.py +699 -0
  55. brainstate-0.2.1/brainstate/nn/_paddings.py +1020 -0
  56. brainstate-0.2.1/brainstate/nn/_paddings_test.py +723 -0
  57. brainstate-0.2.1/brainstate/nn/_poolings.py +2239 -0
  58. brainstate-0.2.1/brainstate/nn/_poolings_test.py +953 -0
  59. brainstate-0.1.10/brainstate/nn/_rate_rnns.py → brainstate-0.2.1/brainstate/nn/_rnns.py +946 -554
  60. brainstate-0.2.1/brainstate/nn/_rnns_test.py +593 -0
  61. brainstate-0.2.1/brainstate/nn/_utils.py +216 -0
  62. brainstate-0.2.1/brainstate/nn/_utils_test.py +402 -0
  63. brainstate-0.1.10/brainstate/init/_random_inits.py → brainstate-0.2.1/brainstate/nn/init.py +809 -553
  64. brainstate-0.1.10/brainstate/init/_random_inits_test.py → brainstate-0.2.1/brainstate/nn/init_test.py +180 -149
  65. brainstate-0.2.1/brainstate/random/__init__.py +270 -0
  66. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/random/_rand_funs.py +3938 -3616
  67. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/random/_rand_funs_test.py +640 -567
  68. brainstate-0.2.1/brainstate/random/_rand_seed.py +675 -0
  69. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/random/_rand_seed_test.py +48 -48
  70. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate/random/_rand_state.py +1617 -1409
  71. brainstate-0.2.1/brainstate/random/_rand_state_test.py +551 -0
  72. brainstate-0.2.1/brainstate/transform/__init__.py +59 -0
  73. brainstate-0.2.1/brainstate/transform/_ad_checkpoint.py +176 -0
  74. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_ad_checkpoint_test.py +49 -49
  75. {brainstate-0.1.10/brainstate/augment → brainstate-0.2.1/brainstate/transform}/_autograd.py +1025 -778
  76. {brainstate-0.1.10/brainstate/augment → brainstate-0.2.1/brainstate/transform}/_autograd_test.py +1289 -1289
  77. brainstate-0.2.1/brainstate/transform/_conditions.py +316 -0
  78. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_conditions_test.py +220 -220
  79. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_error_if.py +94 -92
  80. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_error_if_test.py +52 -52
  81. brainstate-0.2.1/brainstate/transform/_eval_shape.py +145 -0
  82. {brainstate-0.1.10/brainstate/augment → brainstate-0.2.1/brainstate/transform}/_eval_shape_test.py +38 -38
  83. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_jit.py +399 -346
  84. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_jit_test.py +143 -143
  85. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_loop_collect_return.py +675 -536
  86. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_loop_collect_return_test.py +58 -58
  87. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_loop_no_collection.py +283 -184
  88. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_loop_no_collection_test.py +50 -50
  89. brainstate-0.2.1/brainstate/transform/_make_jaxpr.py +2016 -0
  90. brainstate-0.2.1/brainstate/transform/_make_jaxpr_test.py +1510 -0
  91. brainstate-0.2.1/brainstate/transform/_mapping.py +529 -0
  92. brainstate-0.2.1/brainstate/transform/_mapping_test.py +194 -0
  93. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_progress_bar.py +255 -202
  94. {brainstate-0.1.10/brainstate/augment → brainstate-0.2.1/brainstate/transform}/_random.py +171 -151
  95. {brainstate-0.1.10/brainstate/compile → brainstate-0.2.1/brainstate/transform}/_unvmap.py +256 -159
  96. brainstate-0.2.1/brainstate/transform/_util.py +286 -0
  97. brainstate-0.2.1/brainstate/typing.py +837 -0
  98. brainstate-0.2.1/brainstate/typing_test.py +780 -0
  99. {brainstate-0.1.10/brainstate/optim → brainstate-0.2.1/brainstate/util}/__init__.py +27 -38
  100. brainstate-0.2.1/brainstate/util/_others.py +1025 -0
  101. brainstate-0.2.1/brainstate/util/_others_test.py +962 -0
  102. brainstate-0.2.1/brainstate/util/_pretty_pytree.py +1301 -0
  103. brainstate-0.2.1/brainstate/util/_pretty_pytree_test.py +675 -0
  104. brainstate-0.1.10/brainstate/util/pretty_repr.py → brainstate-0.2.1/brainstate/util/_pretty_repr.py +462 -328
  105. brainstate-0.2.1/brainstate/util/_pretty_repr_test.py +696 -0
  106. brainstate-0.2.1/brainstate/util/filter.py +945 -0
  107. brainstate-0.2.1/brainstate/util/filter_test.py +912 -0
  108. brainstate-0.2.1/brainstate/util/struct.py +910 -0
  109. brainstate-0.2.1/brainstate/util/struct_test.py +602 -0
  110. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate.egg-info/PKG-INFO +108 -91
  111. brainstate-0.2.1/brainstate.egg-info/SOURCES.txt +114 -0
  112. brainstate-0.2.1/brainstate.egg-info/requires.txt +31 -0
  113. {brainstate-0.1.10 → brainstate-0.2.1}/pyproject.toml +107 -71
  114. {brainstate-0.1.10 → brainstate-0.2.1}/setup.cfg +4 -4
  115. brainstate-0.1.10/brainstate/__init__.py +0 -58
  116. brainstate-0.1.10/brainstate/_compatible_import.py +0 -148
  117. brainstate-0.1.10/brainstate/augment/__init__.py +0 -30
  118. brainstate-0.1.10/brainstate/augment/_eval_shape.py +0 -99
  119. brainstate-0.1.10/brainstate/augment/_mapping.py +0 -1060
  120. brainstate-0.1.10/brainstate/augment/_mapping_test.py +0 -597
  121. brainstate-0.1.10/brainstate/compile/__init__.py +0 -38
  122. brainstate-0.1.10/brainstate/compile/_ad_checkpoint.py +0 -204
  123. brainstate-0.1.10/brainstate/compile/_conditions.py +0 -256
  124. brainstate-0.1.10/brainstate/compile/_make_jaxpr.py +0 -888
  125. brainstate-0.1.10/brainstate/compile/_make_jaxpr_test.py +0 -156
  126. brainstate-0.1.10/brainstate/compile/_util.py +0 -147
  127. brainstate-0.1.10/brainstate/environ.py +0 -563
  128. brainstate-0.1.10/brainstate/environ_test.py +0 -62
  129. brainstate-0.1.10/brainstate/functional/__init__.py +0 -27
  130. brainstate-0.1.10/brainstate/graph/__init__.py +0 -29
  131. brainstate-0.1.10/brainstate/graph/_graph_node.py +0 -244
  132. brainstate-0.1.10/brainstate/graph/_graph_node_test.py +0 -73
  133. brainstate-0.1.10/brainstate/graph/_graph_operation_test.py +0 -563
  134. brainstate-0.1.10/brainstate/init/__init__.py +0 -26
  135. brainstate-0.1.10/brainstate/init/_base.py +0 -52
  136. brainstate-0.1.10/brainstate/init/_generic.py +0 -244
  137. brainstate-0.1.10/brainstate/init/_regular_inits.py +0 -105
  138. brainstate-0.1.10/brainstate/init/_regular_inits_test.py +0 -50
  139. brainstate-0.1.10/brainstate/mixin.py +0 -365
  140. brainstate-0.1.10/brainstate/mixin_test.py +0 -77
  141. brainstate-0.1.10/brainstate/nn/__init__.py +0 -135
  142. brainstate-0.1.10/brainstate/nn/_activations.py +0 -808
  143. brainstate-0.1.10/brainstate/nn/_collective_ops.py +0 -514
  144. brainstate-0.1.10/brainstate/nn/_collective_ops_test.py +0 -43
  145. brainstate-0.1.10/brainstate/nn/_common.py +0 -178
  146. brainstate-0.1.10/brainstate/nn/_conv.py +0 -501
  147. brainstate-0.1.10/brainstate/nn/_conv_test.py +0 -238
  148. brainstate-0.1.10/brainstate/nn/_dropout.py +0 -426
  149. brainstate-0.1.10/brainstate/nn/_dropout_test.py +0 -100
  150. brainstate-0.1.10/brainstate/nn/_elementwise_test.py +0 -169
  151. brainstate-0.1.10/brainstate/nn/_embedding.py +0 -58
  152. brainstate-0.1.10/brainstate/nn/_exp_euler.py +0 -92
  153. brainstate-0.1.10/brainstate/nn/_exp_euler_test.py +0 -35
  154. brainstate-0.1.10/brainstate/nn/_inputs.py +0 -608
  155. brainstate-0.1.10/brainstate/nn/_linear.py +0 -424
  156. brainstate-0.1.10/brainstate/nn/_linear_test.py +0 -107
  157. brainstate-0.1.10/brainstate/nn/_ltp.py +0 -28
  158. brainstate-0.1.10/brainstate/nn/_neuron.py +0 -705
  159. brainstate-0.1.10/brainstate/nn/_neuron_test.py +0 -161
  160. brainstate-0.1.10/brainstate/nn/_normalizations.py +0 -975
  161. brainstate-0.1.10/brainstate/nn/_normalizations_test.py +0 -73
  162. brainstate-0.1.10/brainstate/nn/_others.py +0 -46
  163. brainstate-0.1.10/brainstate/nn/_poolings.py +0 -1177
  164. brainstate-0.1.10/brainstate/nn/_poolings_test.py +0 -217
  165. brainstate-0.1.10/brainstate/nn/_projection.py +0 -486
  166. brainstate-0.1.10/brainstate/nn/_rate_rnns_test.py +0 -63
  167. brainstate-0.1.10/brainstate/nn/_readout.py +0 -209
  168. brainstate-0.1.10/brainstate/nn/_readout_test.py +0 -53
  169. brainstate-0.1.10/brainstate/nn/_stp.py +0 -236
  170. brainstate-0.1.10/brainstate/nn/_synapse.py +0 -505
  171. brainstate-0.1.10/brainstate/nn/_synapse_test.py +0 -131
  172. brainstate-0.1.10/brainstate/nn/_synaptic_projection.py +0 -423
  173. brainstate-0.1.10/brainstate/nn/_synouts.py +0 -162
  174. brainstate-0.1.10/brainstate/nn/_synouts_test.py +0 -57
  175. brainstate-0.1.10/brainstate/nn/_utils.py +0 -89
  176. brainstate-0.1.10/brainstate/nn/metrics.py +0 -388
  177. brainstate-0.1.10/brainstate/optim/_base.py +0 -64
  178. brainstate-0.1.10/brainstate/optim/_lr_scheduler.py +0 -448
  179. brainstate-0.1.10/brainstate/optim/_lr_scheduler_test.py +0 -50
  180. brainstate-0.1.10/brainstate/optim/_optax_optimizer.py +0 -152
  181. brainstate-0.1.10/brainstate/optim/_optax_optimizer_test.py +0 -53
  182. brainstate-0.1.10/brainstate/optim/_sgd_optimizer.py +0 -1104
  183. brainstate-0.1.10/brainstate/random/__init__.py +0 -24
  184. brainstate-0.1.10/brainstate/random/_rand_seed.py +0 -210
  185. brainstate-0.1.10/brainstate/random/_random_for_unit.py +0 -52
  186. brainstate-0.1.10/brainstate/surrogate.py +0 -1957
  187. brainstate-0.1.10/brainstate/typing.py +0 -304
  188. brainstate-0.1.10/brainstate/util/__init__.py +0 -50
  189. brainstate-0.1.10/brainstate/util/caller.py +0 -98
  190. brainstate-0.1.10/brainstate/util/filter.py +0 -469
  191. brainstate-0.1.10/brainstate/util/others.py +0 -540
  192. brainstate-0.1.10/brainstate/util/pretty_pytree.py +0 -945
  193. brainstate-0.1.10/brainstate/util/pretty_pytree_test.py +0 -159
  194. brainstate-0.1.10/brainstate/util/pretty_table.py +0 -2954
  195. brainstate-0.1.10/brainstate/util/scaling.py +0 -258
  196. brainstate-0.1.10/brainstate/util/struct.py +0 -523
  197. brainstate-0.1.10/brainstate.egg-info/SOURCES.txt +0 -134
  198. brainstate-0.1.10/brainstate.egg-info/requires.txt +0 -8
  199. brainstate-0.1.10/setup.py +0 -96
  200. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate.egg-info/dependency_links.txt +0 -0
  201. {brainstate-0.1.10 → brainstate-0.2.1}/brainstate.egg-info/top_level.txt +0 -0
@@ -1,202 +1,202 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [2024] [BDP Ecosystem]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [2024] [BDP Ecosystem]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -1,91 +1,108 @@
1
- Metadata-Version: 2.4
2
- Name: brainstate
3
- Version: 0.1.10
4
- Summary: A ``State``-based Transformation System for Program Compilation and Augmentation.
5
- Home-page: https://github.com/chaobrain/brainstate
6
- Author: BrainState Developers
7
- Author-email: BrainState Developers <chao.brain@qq.com>
8
- License: Apache-2.0 license
9
- Project-URL: homepage, http://github.com/chaobrain/brainstate
10
- Project-URL: repository, http://github.com/chaobrain/brainstate
11
- Keywords: computational neuroscience,brain-inspired computation,brain dynamics programming
12
- Classifier: Natural Language :: English
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Development Status :: 4 - Beta
15
- Classifier: Intended Audience :: Developers
16
- Classifier: Intended Audience :: Science/Research
17
- Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
21
- Classifier: Programming Language :: Python :: 3.13
22
- Classifier: License :: OSI Approved :: Apache Software License
23
- Classifier: Programming Language :: Python
24
- Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
25
- Classifier: Topic :: Scientific/Engineering :: Mathematics
26
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
27
- Classifier: Topic :: Software Development :: Libraries
28
- Requires-Python: >=3.10
29
- Description-Content-Type: text/markdown
30
- License-File: LICENSE
31
- Requires-Dist: jax
32
- Requires-Dist: jaxlib
33
- Requires-Dist: numpy
34
- Requires-Dist: brainunit>=0.1.0
35
- Requires-Dist: brainevent
36
- Provides-Extra: testing
37
- Requires-Dist: pytest; extra == "testing"
38
- Dynamic: author
39
- Dynamic: home-page
40
- Dynamic: license-file
41
- Dynamic: requires-python
42
-
43
-
44
- # A ``State``-based Transformation System for Program Compilation and Augmentation
45
-
46
-
47
-
48
- <p align="center">
49
- <img alt="Header image of brainstate." src="https://raw.githubusercontent.com/chaobrain/brainstate/main/docs/_static/brainstate.png" width=40%>
50
- </p>
51
-
52
-
53
-
54
- <p align="center">
55
- <a href="https://pypi.org/project/brainstate/"><img alt="Supported Python Version" src="https://img.shields.io/pypi/pyversions/brainstate"></a>
56
- <a href="https://github.com/chaobrain/brainstate/blob/main/LICENSE"><img alt="LICENSE" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a>
57
- <a href='https://brainstate.readthedocs.io/?badge=latest'>
58
- <img src='https://readthedocs.org/projects/brainstate/badge/?version=latest' alt='Documentation Status' />
59
- </a>
60
- <a href="https://badge.fury.io/py/brainstate"><img alt="PyPI version" src="https://badge.fury.io/py/brainstate.svg"></a>
61
- <a href="https://github.com/chaobrain/brainstate/actions/workflows/CI.yml"><img alt="Continuous Integration" src="https://github.com/chaobrain/brainstate/actions/workflows/CI.yml/badge.svg"></a>
62
- <a href="https://pepy.tech/projects/brainstate"><img src="https://static.pepy.tech/badge/brainstate" alt="PyPI Downloads"></a>
63
- <a href="https://doi.org/10.5281/zenodo.14970015"><img src="https://zenodo.org/badge/811300394.svg" alt="DOI"></a>
64
- </p>
65
-
66
-
67
- ## Installation
68
-
69
- You can install ``brainstate`` via pip:
70
-
71
- ```bash
72
- pip install brainstate --upgrade
73
- ```
74
-
75
- Alternatively, you can install `BrainX`, which bundles `brainstate` with other compatible packages for a comprehensive brain modeling ecosystem:
76
-
77
- ```bash
78
- pip install BrainX -U
79
- ```
80
-
81
- ## Documentation
82
-
83
- The official documentation is hosted on Read the Docs: [https://brainstate.readthedocs.io/](https://brainstate.readthedocs.io/)
84
-
85
-
86
-
87
- ## See also the brain modeling ecosystem
88
-
89
- We are building the brain modeling ecosystem: https://brainmodeling.readthedocs.io/
90
-
91
-
1
+ Metadata-Version: 2.4
2
+ Name: brainstate
3
+ Version: 0.2.1
4
+ Summary: A State-based Transformation System for Brain Modeling.
5
+ Author-email: BrainState Developers <chao.brain@qq.com>
6
+ License: Apache-2.0 license
7
+ Project-URL: homepage, https://github.com/chaobrain/brainstate
8
+ Project-URL: repository, https://github.com/chaobrain/brainstate
9
+ Project-URL: Documentation, https://brainstate.readthedocs.io/
10
+ Project-URL: Source Code, https://github.com/chaobrain/brainstate
11
+ Project-URL: Bug Tracker, https://github.com/chaobrain/brainstate/issues
12
+ Keywords: computational neuroscience,brain-inspired computing,brain simulation,brain modeling,spiking neural networks
13
+ Classifier: Natural Language :: English
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: License :: OSI Approved :: Apache Software License
24
+ Classifier: Programming Language :: Python
25
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
26
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
27
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
28
+ Classifier: Topic :: Software Development :: Libraries
29
+ Requires-Python: >=3.10
30
+ Description-Content-Type: text/markdown
31
+ License-File: LICENSE
32
+ Requires-Dist: numpy>=1.15
33
+ Requires-Dist: tqdm
34
+ Requires-Dist: brainunit
35
+ Requires-Dist: brainevent
36
+ Provides-Extra: cpu
37
+ Requires-Dist: jax[cpu]; extra == "cpu"
38
+ Requires-Dist: brainunit; extra == "cpu"
39
+ Requires-Dist: brainevent; extra == "cpu"
40
+ Provides-Extra: cuda12
41
+ Requires-Dist: jax[cuda12]; extra == "cuda12"
42
+ Requires-Dist: brainunit; extra == "cuda12"
43
+ Requires-Dist: brainevent; extra == "cuda12"
44
+ Provides-Extra: cuda13
45
+ Requires-Dist: jax[cuda13]; extra == "cuda13"
46
+ Requires-Dist: brainunit; extra == "cuda13"
47
+ Requires-Dist: brainevent; extra == "cuda13"
48
+ Provides-Extra: tpu
49
+ Requires-Dist: jax[tpu]; extra == "tpu"
50
+ Requires-Dist: brainunit; extra == "tpu"
51
+ Requires-Dist: brainevent; extra == "tpu"
52
+ Provides-Extra: testing
53
+ Requires-Dist: absl-py; extra == "testing"
54
+ Requires-Dist: pytest; extra == "testing"
55
+ Requires-Dist: jax; extra == "testing"
56
+ Requires-Dist: brainunit; extra == "testing"
57
+ Requires-Dist: brainevent; extra == "testing"
58
+ Dynamic: license-file
59
+
60
+
61
+ # A ``State``-based Transformation System for Brain Modeling
62
+
63
+
64
+
65
+ <p align="center">
66
+ <img alt="Header image of brainstate." src="https://raw.githubusercontent.com/chaobrain/brainstate/main/docs/_static/brainstate.png" width=40%>
67
+ </p>
68
+
69
+
70
+
71
+ <p align="center">
72
+ <a href="https://pypi.org/project/brainstate/"><img alt="Supported Python Version" src="https://img.shields.io/pypi/pyversions/brainstate"></a>
73
+ <a href="https://github.com/chaobrain/brainstate/blob/main/LICENSE"><img alt="LICENSE" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a>
74
+ <a href='https://brainstate.readthedocs.io/?badge=latest'>
75
+ <img src='https://readthedocs.org/projects/brainstate/badge/?version=latest' alt='Documentation Status' />
76
+ </a>
77
+ <a href="https://badge.fury.io/py/brainstate"><img alt="PyPI version" src="https://badge.fury.io/py/brainstate.svg"></a>
78
+ <a href="https://github.com/chaobrain/brainstate/actions/workflows/CI.yml"><img alt="Continuous Integration" src="https://github.com/chaobrain/brainstate/actions/workflows/CI.yml/badge.svg"></a>
79
+ <a href="https://pepy.tech/projects/brainstate"><img src="https://static.pepy.tech/badge/brainstate" alt="PyPI Downloads"></a>
80
+ <a href="https://doi.org/10.5281/zenodo.14970015"><img src="https://zenodo.org/badge/811300394.svg" alt="DOI"></a>
81
+ </p>
82
+
83
+
84
+ ## Installation
85
+
86
+ You can install ``brainstate`` via pip:
87
+
88
+ ```bash
89
+ pip install brainstate --upgrade
90
+ ```
91
+
92
+ Alternatively, you can install `BrainX`, which bundles `brainstate` with other compatible packages for a comprehensive brain modeling ecosystem:
93
+
94
+ ```bash
95
+ pip install BrainX -U
96
+ ```
97
+
98
+ ## Documentation
99
+
100
+ The official documentation is hosted on Read the Docs: [https://brainstate.readthedocs.io/](https://brainstate.readthedocs.io/)
101
+
102
+
103
+
104
+ ## See also the ecosystem
105
+
106
+ ``brainstate`` is one part of our brain simulation ecosystem: https://brainmodeling.readthedocs.io/
107
+
108
+