`BrainPy` is designed to effectively satisfy your basic requirements:
`BrainPy` is designed to effectively satisfy your basic requirements:
- *Easy to learn and use*: BrainPy is only based on Python language and has little dependency requirements.
- *Flexible and transparent*: BrainPy endows the users with the fully data/logic flow control. Users can code any logic they want with BrainPy.
- *Extensible*: BrainPy allow users to extend new functionality just based on Python coding. For example, we extend the numerical integration with the ability to do numerical analysis. In such a way, the same code in BrainPy can not only be used for simulation, but also for dynamics analysis.
- *Efficient running speed*: All codes in BrainPy can be just-in-time compiled (based on [JAX](https://github.com/google/jax) and [Numba](https://github.com/numba/)) to run on CPU or GPU devices, thus guaranteeing its running efficiency.
- **Easy to learn and use**: BrainPy is only based on Python language and has little dependency requirements.
- **Flexible and transparent**: BrainPy endows the users with the fully data/logic flow control. Users can code any logic they want with BrainPy.
- **Extensible**: BrainPy allow users to extend new functionality just based on Python coding. For example, we extend the numerical integration with the ability to do numerical analysis. In such a way, the same code in BrainPy can not only be used for simulation, but also for dynamics analysis.
- **Efficient**: All codes in BrainPy can be just-in-time compiled (based on [JAX](https://github.com/google/jax) and [Numba](https://github.com/numba/)) to run on CPU or GPU devices, thus guaranteeing its running efficiency.
@@ -40,18 +40,25 @@
**Method 1**: install ``BrainPy`` by using ``pip``:
**Method 1**: install ``BrainPy`` by using ``pip``:
To install the stable release of BrainPy (V1.0.3), please use
```python
```python
#
> pip install -U brain-py
> pip install -U brain-py
```
```
To install the latest pre-release version of BrainPy (V1.1.0), please use
```bash
> pip install -U brain-py --pre
```
If you have installed the previous version of BrainPy, please uninstall the older one first
```bash
```bash
# If you have installed the previous version of BrainPy,
- [*(Sherman & Rinzel, 1992)* Gap junction leads to anti-synchronization](https://brainmodels.readthedocs.io/en/latest/examples/gj_nets/Sherman_1992_gj_antisynchrony.html)
- [*(Brunel & Hakim, 1999)* Fast Global Oscillation](https://brainmodels.readthedocs.io/en/latest/examples/oscillation_synchronization/Brunel_Hakim_1999_fast_oscillation.html)
- [*(Diesmann, et, al., 1999)* Synfire Chains](https://brainmodels.readthedocs.io/en/latest/examples/oscillation_synchronization/Diesmann_1999_synfire_chains.html)
- **[Working Memory Model]** [*(Mi, et. al., 2017)* STP for Working Memory Capacity](https://brainmodels.readthedocs.io/en/latest/examples/working_memory/Mi_2017_working_memory_capacity.html)
- [ ] ``vars()``: must check whether has circular references
- [x] ``Collector``: must check whether the ``(key,value)`` pair are duplicate (done @2021/08/26 by @chaoming)
- [x] ``Collector``: must check whether the ``(key,value)`` pair are duplicate (done @2021/08/26 by @chaoming)
- [x] ``nodes``: slove the problem of circular reference (done @2021/08/24 by @chaoming)
- [x] ``nodes``: slove the problem of circular reference (done @2021/08/24 by @chaoming)
- [x] ``ints``: get integrators based on all nodes (done @2021/08/24 by @chaoming)
- [x] ``ints``: get integrators based on all nodes (done @2021/08/24 by @chaoming)
@@ -26,14 +27,16 @@
## Math
## Math
- [x] **[Numpy]**: JIT compilation in numpy backend supports ``Base`` and ``Function`` objects (done by chaoming@2021/09/08)
- [ ] **[Numpy]**: support JIT in `fft` sub-module
- [x] **[Numpy]:** support JIT compilation in numpy backend (done @ 2021.09.01 by @chaoming)
- [x] **[Numpy]:** support JIT compilation in numpy backend (done @ 2021.09.01 by @chaoming)
- [x] **[Numpy]:** support 'fft' (done @ 2021.09.03 by @chaoming)
- [x] **[Numpy]:** support 'fft' (done @ 2021.09.03 by @chaoming)
- [ ] support to set `dt` in the single object level (i.e., single instance of DynamicSystem)
- [ ] **[JAX]:** "random" module
- [ ] **[JAX]:** "random" module
- [ ] **[JAX]:** math operations
- [ ] **[JAX]:** math operations
- [ ] **[JAX]:** vmap
- [ ] **[JAX]:** vmap
- [ ] **[JAX]:** pmap
- [ ] **[JAX]:** pmap
- [ ] **[JAX]:** control conditions:
- [ ] **[JAX]:** control conditions:
- [ ] static_argnums
- [x] **[JAX]:** support 'fft' (done @ 2021.09.03 by @chaoming)
- [x] **[JAX]:** support 'fft' (done @ 2021.09.03 by @chaoming)
- [x] **[JAX]:** **IMPORTANT!!!** Change API of `grad()` and `value_and_grad()`: There are bugs in the gradient functions. Gradient computation also needs to inspect the variable types. Moreover, it is independent from the JIT function. Therefore, we should pass dynamical variables into the gradient functions too. (done @ 2021.08.26 by @chaoming)
- [x] **[JAX]:** **IMPORTANT!!!** Change API of `grad()` and `value_and_grad()`: There are bugs in the gradient functions. Gradient computation also needs to inspect the variable types. Moreover, it is independent from the JIT function. Therefore, we should pass dynamical variables into the gradient functions too. (done @ 2021.08.26 by @chaoming)
- [x] **[JAX]:** **IMPORTANT!!!** change API of `vars()`: we should refer Dynamical Variables as `Variable`; We can not retrieve every "JaxArray" from `vars()`, otherwise the whole system will waste a lot of time on useless assignments. (done @ 2021.08.25 by @chaoming)
- [x] **[JAX]:** **IMPORTANT!!!** change API of `vars()`: we should refer Dynamical Variables as `Variable`; We can not retrieve every "JaxArray" from `vars()`, otherwise the whole system will waste a lot of time on useless assignments. (done @ 2021.08.25 by @chaoming)
@@ -42,7 +45,7 @@
- [x] register pytree (done @ 2021.06.15 by @chaoming)
- [x] register pytree (done @ 2021.06.15 by @chaoming)
- [x] support `ndarray` intrinsic methods:
- [x] support `ndarray` intrinsic methods:
- [x] functions in NumPy ndarray: any(), all() .... view() (done @ 2021.06.30 by @chaoming)
- [x] functions in NumPy ndarray: any(), all() .... view() (done @ 2021.06.30 by @chaoming)
- [] functions in JAX DeviceArray:
- [x] functions in JAX DeviceArray:
- [x] numpy methods in JaxArray (done @ 2021.08.25, @2021.08.28 by @chaoming)
- [x] numpy methods in JaxArray (done @ 2021.08.25, @2021.08.28 by @chaoming)
- [x] documentation for JaxArray methods (done @ 2021.08.25 by @chaoming)
- [x] documentation for JaxArray methods (done @ 2021.08.25 by @chaoming)
- [ ] test for ndarray wrapper
- [ ] test for ndarray wrapper
@@ -74,6 +77,9 @@
- [ ] Allow defining the `Soma` object
- [ ] Allow defining the `Soma` object
- [ ] Allow defining the `Dendrite` object
- [ ] Allow defining the `Dendrite` object
- [x] support to set `dt` in the single object level (i.e., single instance of DynamicSystem) (done @2021.09.05 @chaoming)
- [x] reimplement the ``input_step`` and ``monitor_step`` in a more intuitive way (done @2021.09 by chaoming)
- [x] remove ``_i`` in ``update()`` function, replace ``_i`` with ``_dt``, meaning the dynamic system has the canonic equation form of $dx/dt = f(x, t, dt)$ (done @2021.09 by chaoming)
@@ -102,8 +108,18 @@
## Documentation
## Documentation
- [ ]
- [ ] documentation
- [ ] tutorial for "Numerical Solvers": more precise and intuitive
- [x] tutorial for "JIT compilation": BrainPy's JIT for class objects (done by chaoming@2021.09.08)
- [x] tutorial for "Dynamics Simulation", detail the function of ``brainpy.DynamicalSystem`` (done by chaoming@2021/09/09)
- [x] documentation for ``math`` module (done @2021.09)
- [ ] documentation for BrainModels
- [ ] documentation for neuron models
- [ ] documentation for synapse models
- [ ] documentation for COBA, CUBA synapses
- [ ] detailed documentation for numerical solvers of SDEs
- [ ] detailed documentation for numerical solvers of SDEs
- [ ] doc comments for ODEs, like Euler, RK2, etc. We should provide the detailed mathematical equations, and the corresponding suggestions for the corresponding algorithm.
- [x] doc comments for ODEs, like Euler, RK2, etc. We should provide the detailed mathematical equations, and the corresponding suggestions for the corresponding algorithm. (done @2021.09.01 @chaoming)
- [x] APIs for integrators (done @2021/08/23 by @chaoming)
- [x] APIs for integrators (done @2021/08/23 by @chaoming)
- [x] installation instruction, especially package dependency (done @2021/08/23 by @chaoming)
- [x] installation instruction, especially package dependency (done @2021/08/23 by @chaoming)
@@ -125,7 +141,11 @@
## Others
## Others
- [ ] publish `BrainPy` on `"conda-forge"`: https://conda-forge.org/docs/maintainer/adding_pkgs.html#
- [x] publish `BrainPy` on `"conda-forge"`: https://conda-forge.org/docs/maintainer/adding_pkgs.html# (cancelled)
[1] Brette, R., Rudolph, M., Carnevale, T. et al. Simulation of networks of spiking neurons: A review of tools and strategies. J Comput Neurosci 23, 349–398 (2007). https://doi.org/10.1007/s10827-007-0038-6
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.