ANNarchy 5.0.1__tar.gz → 5.0.2__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 (248) hide show
  1. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/__init__.py +111 -21
  2. annarchy-5.0.1/ANNarchy/core/Parameters.py → annarchy-5.0.2/ANNarchy/core/Attributes.py +47 -27
  3. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/ConnectorMethods.py +420 -111
  4. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Constant.py +17 -8
  5. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Dendrite.py +197 -112
  6. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Global.py +112 -58
  7. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/IO.py +195 -120
  8. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Monitor.py +389 -234
  9. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Network.py +378 -229
  10. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Neuron.py +155 -48
  11. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Population.py +353 -180
  12. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/PopulationView.py +75 -43
  13. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Projection.py +720 -333
  14. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Random.py +94 -53
  15. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Simulate.py +157 -57
  16. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Synapse.py +124 -46
  17. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/Utils.py +59 -23
  18. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/cython_ext/Connector.pyx +6 -6
  19. annarchy-5.0.2/ANNarchy/cython_ext/__init__.py +25 -0
  20. annarchy-5.0.2/ANNarchy/extensions/__init__.py +1 -0
  21. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/ann_to_snn_conversion/ANNtoSNNConverter.py +85 -79
  22. annarchy-5.0.2/ANNarchy/extensions/ann_to_snn_conversion/InputEncoding.py +79 -0
  23. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/ann_to_snn_conversion/ReadOut.py +19 -19
  24. annarchy-5.0.2/ANNarchy/extensions/ann_to_snn_conversion/__init__.py +1 -0
  25. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/bold/AccProjection.py +94 -76
  26. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/bold/BoldModel.py +27 -12
  27. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/bold/BoldMonitor.py +80 -49
  28. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/bold/NormProjection.py +156 -91
  29. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/bold/PredefinedModels.py +102 -83
  30. annarchy-5.0.2/ANNarchy/extensions/bold/__init__.py +24 -0
  31. annarchy-5.0.2/ANNarchy/extensions/convolution/Convolve.py +1623 -0
  32. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/convolution/ConvolveTemplate.py +26 -45
  33. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/convolution/Copy.py +110 -66
  34. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/convolution/CopyTemplate.py +12 -15
  35. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/convolution/Pooling.py +338 -200
  36. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/convolution/PoolingTemplate.py +49 -64
  37. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/convolution/Transpose.py +130 -105
  38. annarchy-5.0.2/ANNarchy/extensions/convolution/Utils.py +25 -0
  39. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/convolution/__init__.py +2 -1
  40. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/diagonal/DiagonalProjection.py +154 -120
  41. annarchy-5.0.2/ANNarchy/extensions/diagonal/__init__.py +1 -0
  42. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/hybrid/HybridPopulation.py +158 -67
  43. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/hybrid/__init__.py +1 -1
  44. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/image/ImagePopulation.py +123 -77
  45. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/tensorboard/Logger.py +108 -63
  46. annarchy-5.0.2/ANNarchy/extensions/tensorboard/__init__.py +1 -0
  47. annarchy-5.0.2/ANNarchy/generator/CmdLineArgParser.py +191 -0
  48. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/CodeGenerator.py +444 -296
  49. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Compiler.py +439 -265
  50. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Monitor/BaseTemplates.py +16 -16
  51. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Monitor/CUDATemplates.py +50 -50
  52. annarchy-5.0.2/ANNarchy/generator/Monitor/MonitorGenerator.py +321 -0
  53. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Monitor/OpenMPTemplates.py +57 -68
  54. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/NanoBind/Generator.py +175 -119
  55. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/NanoBind/Profiler.py +1 -1
  56. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/NanoBind/Projection.py +5 -5
  57. annarchy-5.0.2/ANNarchy/generator/NanoBind/__init__.py +1 -0
  58. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Population/CUDAGenerator.py +756 -461
  59. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Population/CUDATemplates.py +84 -86
  60. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Population/OpenMPGenerator.py +446 -275
  61. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Population/OpenMPTemplates.py +81 -108
  62. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Population/PopulationGenerator.py +254 -173
  63. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Population/SingleThreadGenerator.py +415 -259
  64. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Population/SingleThreadTemplates.py +78 -94
  65. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Population/__init__.py +1 -1
  66. annarchy-5.0.2/ANNarchy/generator/Profile/CPP11Profile.py +424 -0
  67. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Profile/CUDAProfile.py +93 -64
  68. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Profile/ProfileGenerator.py +22 -20
  69. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Profile/ProfileTemplate.py +123 -128
  70. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Profile/__init__.py +1 -1
  71. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/BSR.py +63 -86
  72. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/BaseTemplates.py +27 -27
  73. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/COO.py +53 -66
  74. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/CSR.py +113 -127
  75. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/CSR_Scalar.py +88 -110
  76. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/CSR_T.py +87 -91
  77. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/CSR_Vector.py +89 -111
  78. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/Dense.py +219 -126
  79. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/Dense_T.py +88 -97
  80. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/ELL.py +84 -98
  81. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/ELLR.py +86 -100
  82. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/HYB.py +57 -77
  83. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/SELL.py +68 -87
  84. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/CUDA/__init__.py +17 -2
  85. annarchy-5.0.2/ANNarchy/generator/Projection/CUDAGenerator.py +2155 -0
  86. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/BSR.py +38 -49
  87. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/BaseTemplates.py +39 -54
  88. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/COO.py +33 -42
  89. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/CSR.py +99 -108
  90. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/CSR_P.py +57 -64
  91. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/CSR_T.py +50 -57
  92. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/CSR_T_P.py +48 -55
  93. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/DIA.py +37 -44
  94. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/Dense.py +156 -84
  95. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/Dense_T.py +51 -58
  96. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/ELL.py +48 -55
  97. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/ELLR.py +40 -51
  98. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/LIL.py +114 -122
  99. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/LIL_P.py +74 -86
  100. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/SELL.py +43 -54
  101. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMP/__init__.py +9 -3
  102. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/OpenMPGenerator.py +827 -519
  103. annarchy-5.0.2/ANNarchy/generator/Projection/ProjectionGenerator.py +1613 -0
  104. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/BSR.py +43 -56
  105. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/BaseTemplates.py +40 -48
  106. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/COO.py +33 -40
  107. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/CSR.py +96 -103
  108. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/CSR_T.py +55 -64
  109. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/DIA.py +37 -44
  110. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/Dense.py +143 -77
  111. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/Dense_PV.py +38 -45
  112. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/Dense_PV_T.py +38 -45
  113. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/Dense_T.py +47 -54
  114. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/ELL.py +49 -57
  115. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/ELLR.py +56 -65
  116. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/HYB.py +32 -33
  117. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/LIL.py +111 -119
  118. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/SELL.py +40 -47
  119. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/SingleThread/__init__.py +9 -3
  120. annarchy-5.0.2/ANNarchy/generator/Projection/SingleThreadGenerator.py +1763 -0
  121. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Projection/__init__.py +4 -2
  122. annarchy-5.0.2/ANNarchy/generator/Sanity.py +490 -0
  123. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Template/BaseTemplate.py +54 -93
  124. annarchy-5.0.2/ANNarchy/generator/Template/CUDABaseTemplate.py +737 -0
  125. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Template/GlobalOperationTemplate.py +71 -76
  126. annarchy-5.0.2/ANNarchy/generator/Template/OpenMPBaseTemplate.py +552 -0
  127. annarchy-5.0.2/ANNarchy/generator/Template/SingleThreadBaseTemplate.py +508 -0
  128. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Utils.py +187 -115
  129. annarchy-5.0.2/ANNarchy/generator/__init__.py +1 -0
  130. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/CSRCMatrixT.hpp +8 -9
  131. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/DenseMatrix.hpp +4 -4
  132. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/DenseMatrixBitmask.hpp +5 -5
  133. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/ELLMatrix.hpp +20 -20
  134. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/ELLRMatrix.hpp +15 -16
  135. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/LILInvMatrix.hpp +10 -16
  136. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/LILMatrix.hpp +41 -44
  137. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/PartitionedMatrix.hpp +10 -11
  138. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/helper_functions.hpp +13 -3
  139. annarchy-5.0.2/ANNarchy/include/logging.hpp +91 -0
  140. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/inputs/CurrentInjection.py +65 -27
  141. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/inputs/DecodingProjection.py +77 -51
  142. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/inputs/InputArray.py +18 -9
  143. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/inputs/PoissonPopulation.py +47 -36
  144. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/inputs/SpikeSourceArray.py +81 -66
  145. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/inputs/SpikeTrains.py +173 -139
  146. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/inputs/TimedArray.py +131 -94
  147. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/inputs/TimedPoissonPopulation.py +135 -84
  148. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/inputs/__init__.py +18 -18
  149. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/intern/ConfigManagement.py +114 -73
  150. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/intern/GlobalObjects.py +41 -30
  151. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/intern/Messages.py +27 -30
  152. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/intern/NetworkManager.py +54 -27
  153. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/intern/Profiler.py +83 -37
  154. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/intern/SpecificPopulation.py +15 -4
  155. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/intern/SpecificProjection.py +18 -9
  156. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/models/Neurons.py +630 -322
  157. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/models/Synapses.py +106 -109
  158. annarchy-5.0.2/ANNarchy/models/__init__.py +20 -0
  159. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/parser/AnalyseNeuron.py +168 -130
  160. annarchy-5.0.2/ANNarchy/parser/AnalyseSynapse.py +590 -0
  161. annarchy-5.0.2/ANNarchy/parser/CoupledEquations.py +430 -0
  162. annarchy-5.0.2/ANNarchy/parser/Equation.py +893 -0
  163. annarchy-5.0.2/ANNarchy/parser/Extraction.py +1102 -0
  164. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/parser/Function.py +50 -43
  165. annarchy-5.0.2/ANNarchy/parser/ITE.py +180 -0
  166. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/parser/ParserTemplate.py +45 -37
  167. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/parser/StringManipulation.py +85 -78
  168. annarchy-5.0.2/ANNarchy/parser/report/LatexParser.py +623 -0
  169. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/parser/report/LatexReport.py +186 -112
  170. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/parser/report/MarkdownReport.py +234 -122
  171. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/parser/report/Report.py +21 -6
  172. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy.egg-info/PKG-INFO +1 -1
  173. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy.egg-info/SOURCES.txt +5 -1
  174. {annarchy-5.0.1 → annarchy-5.0.2}/PKG-INFO +1 -1
  175. {annarchy-5.0.1 → annarchy-5.0.2}/pyproject.toml +1 -1
  176. {annarchy-5.0.1 → annarchy-5.0.2}/setup.py +110 -75
  177. annarchy-5.0.1/ANNarchy/cython_ext/__init__.py +0 -17
  178. annarchy-5.0.1/ANNarchy/extensions/__init__.py +0 -1
  179. annarchy-5.0.1/ANNarchy/extensions/ann_to_snn_conversion/InputEncoding.py +0 -78
  180. annarchy-5.0.1/ANNarchy/extensions/ann_to_snn_conversion/__init__.py +0 -1
  181. annarchy-5.0.1/ANNarchy/extensions/bold/__init__.py +0 -7
  182. annarchy-5.0.1/ANNarchy/extensions/convolution/Convolve.py +0 -1213
  183. annarchy-5.0.1/ANNarchy/extensions/convolution/Utils.py +0 -26
  184. annarchy-5.0.1/ANNarchy/extensions/diagonal/__init__.py +0 -1
  185. annarchy-5.0.1/ANNarchy/extensions/tensorboard/__init__.py +0 -1
  186. annarchy-5.0.1/ANNarchy/generator/CmdLineArgParser.py +0 -94
  187. annarchy-5.0.1/ANNarchy/generator/Monitor/MonitorGenerator.py +0 -298
  188. annarchy-5.0.1/ANNarchy/generator/NanoBind/__init__.py +0 -1
  189. annarchy-5.0.1/ANNarchy/generator/Profile/CPP11Profile.py +0 -346
  190. annarchy-5.0.1/ANNarchy/generator/Projection/CUDAGenerator.py +0 -1789
  191. annarchy-5.0.1/ANNarchy/generator/Projection/ProjectionGenerator.py +0 -1141
  192. annarchy-5.0.1/ANNarchy/generator/Projection/SingleThreadGenerator.py +0 -1433
  193. annarchy-5.0.1/ANNarchy/generator/Sanity.py +0 -316
  194. annarchy-5.0.1/ANNarchy/generator/__init__.py +0 -2
  195. annarchy-5.0.1/ANNarchy/models/__init__.py +0 -4
  196. annarchy-5.0.1/ANNarchy/parser/AnalyseSynapse.py +0 -470
  197. annarchy-5.0.1/ANNarchy/parser/CoupledEquations.py +0 -343
  198. annarchy-5.0.1/ANNarchy/parser/Equation.py +0 -746
  199. annarchy-5.0.1/ANNarchy/parser/Extraction.py +0 -945
  200. annarchy-5.0.1/ANNarchy/parser/ITE.py +0 -162
  201. annarchy-5.0.1/ANNarchy/parser/report/LatexParser.py +0 -509
  202. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/core/__init__.py +0 -0
  203. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/cython_ext/Connector.pxd +0 -0
  204. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/cython_ext/Coordinates.pxd +0 -0
  205. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/cython_ext/Coordinates.pyx +0 -0
  206. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/cython_ext/Transformations.pyx +0 -0
  207. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/cython_ext/__init__.pxd +0 -0
  208. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/extensions/image/__init__.py +0 -0
  209. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/NanoBind/BaseTemplate.py +0 -0
  210. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/NanoBind/Population.py +0 -0
  211. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Template/CMakeTemplate.py +0 -0
  212. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/generator/Template/__init__.py +0 -0
  213. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/BSRInvMatrix.hpp +0 -0
  214. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/BSRInvMatrixBitmask.hpp +0 -0
  215. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/BSRMatrix.hpp +0 -0
  216. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/BSRMatrixBitmask.hpp +0 -0
  217. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/BSRMatrixCUDA.hpp +0 -0
  218. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/COOMatrix.hpp +0 -0
  219. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/COOMatrixCUDA.hpp +0 -0
  220. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/CSRCMatrix.hpp +0 -0
  221. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/CSRCMatrixCUDA.hpp +0 -0
  222. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/CSRCMatrixCUDAT.hpp +0 -0
  223. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/CSRMatrix.hpp +0 -0
  224. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/CSRMatrixCUDA.hpp +0 -0
  225. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/DenseMatrixCUDA.hpp +0 -0
  226. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/DenseMatrixOffsets.hpp +0 -0
  227. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/DiaMatrix.hpp +0 -0
  228. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/ELLMatrixCUDA.hpp +0 -0
  229. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/ELLRMatrixCUDA.hpp +0 -0
  230. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/HYBMatrix.hpp +0 -0
  231. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/HYBMatrixCUDA.hpp +0 -0
  232. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/SELLMatrix.hpp +0 -0
  233. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/SELLMatrixCUDA.hpp +0 -0
  234. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/Specific.hpp +0 -0
  235. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/VecTransformation.hpp +0 -0
  236. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/include/helper_functions.cuh +0 -0
  237. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/intern/__init__.py +0 -0
  238. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/parser/__init__.py +0 -0
  239. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/parser/report/__init__.py +0 -0
  240. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy/thirdparty/randutils.hpp +0 -0
  241. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy.egg-info/dependency_links.txt +0 -0
  242. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy.egg-info/requires.txt +0 -0
  243. {annarchy-5.0.1 → annarchy-5.0.2}/ANNarchy.egg-info/top_level.txt +0 -0
  244. {annarchy-5.0.1 → annarchy-5.0.2}/AUTHORS +0 -0
  245. {annarchy-5.0.1 → annarchy-5.0.2}/LICENSE +0 -0
  246. {annarchy-5.0.1 → annarchy-5.0.2}/MANIFEST.in +0 -0
  247. {annarchy-5.0.1 → annarchy-5.0.2}/README.md +0 -0
  248. {annarchy-5.0.1 → annarchy-5.0.2}/setup.cfg +0 -0
@@ -7,20 +7,54 @@ from .core.Global import *
7
7
  from .core.Simulate import *
8
8
  from .core.Constant import Constant
9
9
  from .core.Neuron import Neuron
10
- from .core.Parameters import Parameter, Variable, Creating, Pruning
10
+ from .core.Attributes import Parameter, Variable, Creating, Pruning
11
11
  from .core.Synapse import Synapse
12
12
  from .core.Population import Population
13
13
  from .core.Projection import Projection
14
14
  from .inputs import *
15
15
  from .core.Dendrite import Dendrite
16
- from .core.Random import Uniform, DiscreteUniform, Normal, LogNormal, Gamma, Exponential, Binomial
17
- from .core.IO import save, load, load_parameter, load_parameters, save_parameters, MonitorList
16
+ from .core.Random import (
17
+ Uniform,
18
+ DiscreteUniform,
19
+ Normal,
20
+ LogNormal,
21
+ Gamma,
22
+ Exponential,
23
+ Binomial,
24
+ )
25
+ from .core.IO import (
26
+ save,
27
+ load,
28
+ load_parameter,
29
+ load_parameters,
30
+ save_parameters,
31
+ MonitorList,
32
+ )
18
33
  from .core.Utils import sparse_random_matrix, sparse_delays_from_weights, timeit
19
34
  from .core.Monitor import Monitor
20
35
  from .core.Network import Network
21
36
  from .parser.report.Report import report
22
- from .models.Neurons import *
23
- from .models.Synapses import *
37
+ from .models.Neurons import (
38
+ LeakyIntegrator,
39
+ EIF_cond_alpha_isfa_ista,
40
+ EIF_cond_exp_isfa_ista,
41
+ GIF_curr,
42
+ GIF_curr_exp,
43
+ HH_cond_exp,
44
+ IF_cond_alpha,
45
+ IF_cond_exp,
46
+ IF_curr_alpha,
47
+ IF_curr_exp,
48
+ Izhikevich
49
+ )
50
+ from .models.Synapses import (
51
+ Hebb,
52
+ IBCM,
53
+ Oja,
54
+ STDP,
55
+ STP,
56
+ Synapse
57
+ )
24
58
  from .extensions import *
25
59
  from .intern.ConfigManagement import setup
26
60
  from .intern import Messages
@@ -43,60 +77,108 @@ from .generator import compile
43
77
 
44
78
  # several setup() arguments can be set on command-line
45
79
  from ANNarchy.generator.CmdLineArgParser import CmdLineArgParser
80
+
46
81
  _arg_parser = CmdLineArgParser()
47
82
  _arg_parser.parse_arguments_for_setup()
48
83
 
49
84
  # Automatically call ANNarchy.core.Global.clear()
50
85
  # if the script terminates
51
86
  import atexit
87
+
52
88
  atexit.register(clear)
53
89
 
54
90
  # Version
55
- __version__ = '5.0'
56
- __release__ = '5.0.1'
91
+ __version__ = "5.0"
92
+ __release__ = "5.0.2"
57
93
 
58
94
  # Deprecated imports from this module:
59
95
  _deprecated = {
60
- "Population", "Projection", "Monitor", "compile", "setup", "simulate", "simulate_until",
61
- "reset", "get_population", "get_projection", "populations", "projections", "monitors",
62
- "enable_learning", "disable_learning", "get_time", "set_time", "get_current_step",
63
- "set_current_step", "dt", "set_seed", "step", "callbacks_enabled", "disable_callbacks",
64
- "enable_callbacks", "clear_all_callbacks", "save", "load", "save_parameters", "load_parameters",
96
+ "Population",
97
+ "Projection",
98
+ "Monitor",
99
+ "compile",
100
+ "setup",
101
+ "simulate",
102
+ "simulate_until",
103
+ "reset",
104
+ "get_population",
105
+ "get_projection",
106
+ "populations",
107
+ "projections",
108
+ "monitors",
109
+ "enable_learning",
110
+ "disable_learning",
111
+ "get_time",
112
+ "set_time",
113
+ "get_current_step",
114
+ "set_current_step",
115
+ "dt",
116
+ "set_seed",
117
+ "step",
118
+ "callbacks_enabled",
119
+ "disable_callbacks",
120
+ "enable_callbacks",
121
+ "clear_all_callbacks",
122
+ "save",
123
+ "load",
124
+ "save_parameters",
125
+ "load_parameters",
65
126
  }
127
+
128
+
66
129
  def _deprecated_wrapper(obj, name, message=None):
67
130
  if isinstance(obj, types.FunctionType):
131
+
68
132
  def wrapper(*args, **kwargs):
69
- Messages._warning(message or f"{name} is deprecated. Please use ann.Network().{name}() instead.")
133
+ Messages.warning(
134
+ message
135
+ or f"{name} is deprecated. Please use ann.Network().{name}() instead."
136
+ )
70
137
  return obj(*args, **kwargs)
138
+
71
139
  wrapper.__name__ = name
72
140
  wrapper.__doc__ = obj.__doc__
73
141
  return wrapper
74
142
  elif isinstance(obj, type): # class
143
+
75
144
  class DeprecatedClass(obj):
76
145
  def __new__(cls, *args, **kwargs):
77
- Messages._warning(message or f"{name} is deprecated. Please use ann.Network().{name}() instead.")
146
+ Messages.warning(
147
+ message
148
+ or f"{name} is deprecated. Please use ann.Network().{name}() instead."
149
+ )
78
150
  return super().__new__(cls)
151
+
79
152
  DeprecatedClass.__name__ = name
80
153
  DeprecatedClass.__doc__ = obj.__doc__
81
154
  return DeprecatedClass
82
155
  else:
83
156
  return obj
84
157
 
158
+
85
159
  for name in _deprecated:
86
160
  obj = globals().get(name)
87
161
  if obj is not None:
88
162
  if name == "Population":
89
- message = "Population is deprecated. Please use ann.Network().create() instead."
163
+ message = (
164
+ "Population is deprecated. Please use ann.Network().create() instead."
165
+ )
90
166
  elif name == "Projection":
91
- message = "Projection is deprecated. Please use ann.Network().connect() instead."
167
+ message = (
168
+ "Projection is deprecated. Please use ann.Network().connect() instead."
169
+ )
92
170
  elif name == "Monitor":
93
- message = "Monitor is deprecated. Please use ann.Network().monitor() instead."
171
+ message = (
172
+ "Monitor is deprecated. Please use ann.Network().monitor() instead."
173
+ )
94
174
  elif name == "compile":
95
175
  message = "compile is deprecated. Please use ann.Network().compile() instead.\n\t Since ANNarchy 5.0 the compilation of shadow networks is not supported anymore\n\t and using them possibly could generate errorneous simulation results or crash.\n\t You need to construct a Network object, please refer to the documentation."
96
176
  elif name == "set_seed":
97
177
  message = "set_seed is deprecated. Please use ann.Network().seed() instead."
98
178
  elif name == "save_parameters":
99
- message = "save_parameters is deprecated and will be removed in future releases."
179
+ message = (
180
+ "save_parameters is deprecated and will be removed in future releases."
181
+ )
100
182
  elif name == "load_parameters":
101
183
  message = "load_parameters is deprecated. Parameters can be directly loaded and used as dictionaries in Neuron and Synapse definitions."
102
184
  else:
@@ -104,6 +186,14 @@ for name in _deprecated:
104
186
  globals()[name] = _deprecated_wrapper(obj, name, message)
105
187
 
106
188
 
107
-
108
- print( 'ANNarchy ' + __version__ + ' (' + __release__ + \
109
- ') on ' + sys.platform + ' (' + os.name + ').' )
189
+ print(
190
+ "ANNarchy "
191
+ + __version__
192
+ + " ("
193
+ + __release__
194
+ + ") on "
195
+ + sys.platform
196
+ + " ("
197
+ + os.name
198
+ + ")."
199
+ )
@@ -8,6 +8,7 @@ from ANNarchy.core.Random import RandomDistribution
8
8
 
9
9
  # Parameters
10
10
 
11
+
11
12
  @dataclass
12
13
  class Parameter:
13
14
  """
@@ -17,11 +18,11 @@ class Parameter:
17
18
  neuron = ann.Neuron(
18
19
  parameters = dict(
19
20
 
20
- # Global parameter
21
- tau = 10.0 # or ann.Parameter(value=10.0, locality='global')
21
+ # Global parameter (default)
22
+ tau = 10.0 # or ann.Parameter(value=10.0),
22
23
 
23
24
  # Local parameter
24
- baseline = ann.Parameter(value=ann.Uniform(-1., 1.)),
25
+ baseline = ann.Parameter(value=ann.Uniform(-1., 1.), locality='local'),
25
26
 
26
27
  # Boolean global parameter
27
28
  activated = ann.Parameter(value=True, locality='global', type=bool),
@@ -29,11 +30,11 @@ class Parameter:
29
30
  )
30
31
  ```
31
32
 
32
- In a neuron or synapse model, parameters are global and use the float type if the `Parameter` class is not used.
33
+ In a neuron or synapse model, parameters defined as direct assignment are by default `global` and use the float type.
33
34
 
34
- If you need a local parameter (one value per neuron or synapse), the `Parameter` class allows to specify it. Note that you can also define global parameters by passing `locality='global'`.
35
+ If you need a local parameter (one value per neuron or synapse), the `Parameter` class allows to specify it using `locality='local'`.
35
36
 
36
- Semi-global synaptic parameters (one value per post-synaptic neuron) can be defined using `locality='semiglobalglobal'`.
37
+ Semi-global synaptic parameters (one value per post-synaptic neuron) can be defined using `locality='semiglobal'`.
37
38
 
38
39
  If the parameter is an int or a bool, pass it to the `type` attribute.
39
40
 
@@ -43,8 +44,8 @@ class Parameter:
43
44
  """
44
45
 
45
46
  value: float | int | bool | RandomDistribution
46
- locality: str = 'local'
47
- type: str = 'float'
47
+ locality: str = "global"
48
+ type: str = "float"
48
49
 
49
50
 
50
51
  # Variables
@@ -79,10 +80,10 @@ class Variable:
79
80
  min: float = None
80
81
  max: float = None
81
82
  method: str = None
82
- locality: str = 'local'
83
- type: str = 'float'
83
+ locality: str = "local"
84
+ type: str = "float"
84
85
 
85
- def _to_string(self, object_type:str) -> str:
86
+ def _to_string(self, object_type: str) -> str:
86
87
  "Returns a one-liner string with the flags. object_type is either 'neuron' or 'synapse'. to decide between population and projection"
87
88
 
88
89
  representation = self.equation
@@ -92,7 +93,9 @@ class Variable:
92
93
  flags = []
93
94
 
94
95
  if self.init is not None:
95
- if not has_flag: has_flag = True ; representation += " : "
96
+ if not has_flag:
97
+ has_flag = True
98
+ representation += " : "
96
99
  if isinstance(self.init, (RandomDistribution,)):
97
100
  init = repr(self.init)
98
101
  else:
@@ -100,33 +103,47 @@ class Variable:
100
103
  flags.append(f"init={init}")
101
104
 
102
105
  if self.min is not None:
103
- if not has_flag: has_flag = True ; representation += " : "
106
+ if not has_flag:
107
+ has_flag = True
108
+ representation += " : "
104
109
  flags.append(f"min={self.min}")
105
110
 
106
111
  if self.max is not None:
107
- if not has_flag: has_flag = True ; representation += " : "
112
+ if not has_flag:
113
+ has_flag = True
114
+ representation += " : "
108
115
  flags.append(f"max={self.max}")
109
116
 
110
117
  if self.method is not None:
111
- if not has_flag: has_flag = True ; representation += " : "
118
+ if not has_flag:
119
+ has_flag = True
120
+ representation += " : "
112
121
  flags.append(f"{self.method}")
113
122
 
114
- if self.type != 'float':
115
- if not has_flag: has_flag = True ; representation += " : "
123
+ if self.type != "float":
124
+ if not has_flag:
125
+ has_flag = True
126
+ representation += " : "
116
127
  flags.append(f"{self.type}")
117
128
 
118
- if self.locality != 'local':
119
- if not has_flag: has_flag = True ; representation += " : "
120
- if object_type == 'neuron':
121
- val = 'population' # 'global' and 'population' would work
122
- elif object_type == 'synapse':
123
- if self.locality in ['global', 'projection']: # both are OK
124
- val = 'projection'
125
- else: val = 'postsynaptic'
126
- flags.append(f"{val}")
129
+ if self.locality != "local":
130
+ if not has_flag:
131
+ has_flag = True
132
+ representation += " : "
133
+
134
+ if object_type == "neuron":
135
+ val = "population" # 'global' and 'population' would work
136
+ elif object_type == "synapse":
137
+ if self.locality in ["global", "projection"]: # both are OK
138
+ val = "projection"
139
+ else:
140
+ val = "postsynaptic"
141
+ else:
142
+ raise ValueError("No default flag for object_type =", object_type)
127
143
 
144
+ flags.append(f"{val}")
128
145
 
129
- return representation + ', '.join(flags)
146
+ return representation + ", ".join(flags)
130
147
 
131
148
 
132
149
  # Structural plasticity
@@ -153,11 +170,13 @@ class Creating:
153
170
  :param w: weight when the synapse is created.
154
171
  :param d: delay when the synapse is created.
155
172
  """
173
+
156
174
  equation: str
157
175
  proba: float = 1.0
158
176
  w: float = 0.0
159
177
  d: float = None
160
178
 
179
+
161
180
  @dataclass
162
181
  class Pruning:
163
182
  """
@@ -182,5 +201,6 @@ class Pruning:
182
201
  :param proba: probability of pruning of the synapse.
183
202
 
184
203
  """
204
+
185
205
  equation: str
186
206
  proba: float = 1.0