brainpy

Brain Dynamics Programming in Python

https://github.com/brainpy/BrainPy

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 25 committers (4.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

brain-dynamics-modeling brain-inspired-computing brain-simulations brainpy spiking-neural-networks

Keywords from Contributors

autograding hacking standardization interpretability reporting mesh interactive ida data-profilers agents
Last synced: 6 months ago · JSON representation

Repository

Brain Dynamics Programming in Python

Basic Info
Statistics
  • Stars: 624
  • Watchers: 11
  • Forks: 103
  • Open Issues: 33
  • Releases: 40
Topics
brain-dynamics-modeling brain-inspired-computing brain-simulations brainpy spiking-neural-networks
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Security

README.md

Header image of BrainPy - brain dynamics programming in Python.

Supported Python Version LICENSE Documentation PyPI version Continuous Integration Continuous Integration with Models

BrainPy is a flexible, efficient, and extensible framework for computational neuroscience and brain-inspired computation based on the Just-In-Time (JIT) compilation. It provides an integrative ecosystem for brain dynamics programming, including brain dynamics building, simulation, training, analysis, etc.

  • Website (documentation and APIs): https://brainpy.readthedocs.io/
  • Source: https://github.com/brainpy/BrainPy
  • Bug reports: https://github.com/brainpy/BrainPy/issues
  • Ecosystem: https://brainmodeling.readthedocs.io/

BrainPy is rewritten based on brainstate since August 2025, please learn brainstate documentation for the latest updates.

Installation

BrainPy is based on Python (>=3.10) and can be installed on Linux (Ubuntu 16.04 or later), macOS (10.12 or later), and Windows platforms.

Using BrainPy with docker

We provide a docker image for BrainPy. You can use the following command to pull the image: bash $ docker pull brainpy/brainpy:latest

Then, you can run the image with the following command: bash $ docker run -it --platform linux/amd64 brainpy/brainpy:latest

Using BrainPy with Binder

We provide a Binder environment for BrainPy. You can use the following button to launch the environment:

Binder

Ecosystem

Citing

If you are using brainpy, please consider citing the corresponding paper:

bibtex @article {10.7554/eLife.86365, article_type = {journal}, title = {BrainPy, a flexible, integrative, efficient, and extensible framework for general-purpose brain dynamics programming}, author = {Wang, Chaoming and Zhang, Tianqiu and Chen, Xiaoyu and He, Sichao and Li, Shangyang and Wu, Si}, editor = {Stimberg, Marcel}, volume = 12, year = 2023, month = {dec}, pub_date = {2023-12-22}, pages = {e86365}, citation = {eLife 2023;12:e86365}, doi = {10.7554/eLife.86365}, url = {https://doi.org/10.7554/eLife.86365}, abstract = {Elucidating the intricate neural mechanisms underlying brain functions requires integrative brain dynamics modeling. To facilitate this process, it is crucial to develop a general-purpose programming framework that allows users to freely define neural models across multiple scales, efficiently simulate, train, and analyze model dynamics, and conveniently incorporate new modeling approaches. In response to this need, we present BrainPy. BrainPy leverages the advanced just-in-time (JIT) compilation capabilities of JAX and XLA to provide a powerful infrastructure tailored for brain dynamics programming. It offers an integrated platform for building, simulating, training, and analyzing brain dynamics models. Models defined in BrainPy can be JIT compiled into binary instructions for various devices, including Central Processing Unit (CPU), Graphics Processing Unit (GPU), and Tensor Processing Unit (TPU), which ensures high running performance comparable to native C or CUDA. Additionally, BrainPy features an extensible architecture that allows for easy expansion of new infrastructure, utilities, and machine-learning approaches. This flexibility enables researchers to incorporate cutting-edge techniques and adapt the framework to their specific needs}, journal = {eLife}, issn = {2050-084X}, publisher = {eLife Sciences Publications, Ltd}, }

Owner

  • Name: brainpy
  • Login: brainpy
  • Kind: organization
  • Location: China

The solution for general-purpose brain dynamics programming

GitHub Events

Total
  • Issues event: 39
  • Watch event: 87
  • Delete event: 71
  • Issue comment event: 125
  • Push event: 78
  • Pull request review comment event: 23
  • Pull request review event: 17
  • Pull request event: 99
  • Fork event: 7
  • Create event: 60
Last Year
  • Issues event: 39
  • Watch event: 87
  • Delete event: 71
  • Issue comment event: 125
  • Push event: 78
  • Pull request review comment event: 23
  • Pull request review event: 17
  • Pull request event: 99
  • Fork event: 7
  • Create event: 60

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 2,704
  • Total Committers: 25
  • Avg Commits per committer: 108.16
  • Development Distribution Score (DDS): 0.592
Past Year
  • Commits: 743
  • Committers: 16
  • Avg Commits per committer: 46.438
  • Development Distribution Score (DDS): 0.564
Top Committers
Name Email Commits
chaoming a****o@o****m 1,104
chaoming c****n@q****m 877
Brandon Zhang z****a@1****m 278
chaoming o****o@h****m 180
c-xy17 c****7@t****n 85
Xiaoyu Chen 5****7 34
He Sichao 1****4@q****m 34
c-xy17 5****5@q****m 18
张泽清 z****1 14
AkitsuFaye 1****7@q****m 14
Brandon Zhang 5****a 12
GYF 1****9@q****m 12
yqianjiang y****y@g****m 10
adaliuBC a****8@1****m 6
Breeze-P z****8@g****m 5
charlielam0615 l****n@m****n 5
dependabot[bot] 4****] 4
terrypang t****g@a****m 3
Shangyang Li s****i@q****m 3
hefucun h****n 1
MamieZhu 1****6@q****m 1
github-actions[bot] 4****] 1
StarGrys 7****8@q****m 1
ZhangzeqingCN 8****N 1
jhb j****6@q****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 93
  • Total pull requests: 496
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 34
  • Total pull request authors: 20
  • Average comments per issue: 2.14
  • Average comments per pull request: 0.28
  • Merged pull requests: 370
  • Bot issues: 0
  • Bot pull requests: 80
Past Year
  • Issues: 27
  • Pull requests: 111
  • Average time to close issues: 28 days
  • Average time to close pull requests: 10 days
  • Issue authors: 19
  • Pull request authors: 3
  • Average comments per issue: 1.85
  • Average comments per pull request: 0.51
  • Merged pull requests: 40
  • Bot issues: 0
  • Bot pull requests: 63
Top Authors
Issue Authors
  • CloudyDory (21)
  • chaoming0625 (19)
  • PikaPei (6)
  • Dr-Chen-Xiaoyu (4)
  • Routhleck (3)
  • ZhenyuanJin (3)
  • Newtonpula (3)
  • Dong-Jiahuan (2)
  • llandsmeer (2)
  • hhx0320 (2)
  • alexfanqi (2)
  • ChromatinRemodeling (2)
  • hongruj (2)
  • HaoWillSi (2)
  • madara-1112 (1)
Pull Request Authors
  • chaoming0625 (258)
  • Routhleck (96)
  • dependabot[bot] (80)
  • ztqakita (18)
  • charlielam0615 (9)
  • CloudyDory (6)
  • ZhangzeqingCN (5)
  • yygf123 (5)
  • c-xy17 (4)
  • AkitsuFaye (3)
  • Breeze-P (2)
  • grysgreat (2)
  • Dong-Jiahuan (1)
  • HoshinoKoji (1)
  • LuckyHFC (1)
Top Labels
Issue Labels
bug (36) enhancement (27) brainpy.math (5) documentation (3) brainpy.dyn (2) help wanted (1) invalid (1) question (1)
Pull Request Labels
dependencies (82) python (72) brainpy.math (11) github_actions (8) enhancement (7) documentation (6) bug (2)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 3,167 last-month
  • Total dependent packages: 10
    (may contain duplicates)
  • Total dependent repositories: 9
    (may contain duplicates)
  • Total versions: 130
  • Total maintainers: 2
pypi.org: brainpy

BrainPy: Brain Dynamics Programming in Python

  • Versions: 77
  • Dependent Packages: 2
  • Dependent Repositories: 7
  • Downloads: 1,698 Last month
Rankings
Dependent packages count: 2.2%
Stargazers count: 3.4%
Average: 4.3%
Forks count: 5.0%
Downloads: 5.4%
Dependent repos count: 5.7%
Maintainers (2)
Last synced: 6 months ago
pypi.org: brainpylib

C++/CUDA Library for BrainPy

  • Versions: 33
  • Dependent Packages: 6
  • Dependent Repositories: 2
  • Downloads: 1,187 Last month
Rankings
Dependent packages count: 3.2%
Stargazers count: 3.2%
Downloads: 4.2%
Forks count: 4.9%
Average: 5.4%
Dependent repos count: 11.6%
Maintainers (2)
Last synced: 6 months ago
pypi.org: brainpylib-cu12x

C++/CUDA Library for BrainPy

  • Versions: 10
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 140 Last month
Rankings
Dependent packages count: 7.4%
Average: 38.2%
Dependent repos count: 69.1%
Maintainers (1)
Last synced: 6 months ago
pypi.org: brainpylib-cu11x

C++/CUDA Library for BrainPy

  • Versions: 10
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 142 Last month
Rankings
Dependent packages count: 7.4%
Average: 38.2%
Dependent repos count: 69.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/Publish.yml actions
  • actions/checkout v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
requirements-dev.txt pypi
  • absl-py * development
  • brainpylib * development
  • h5py * development
  • jaxlib >=0.3.0 development
  • matplotlib >=3.4 development
  • numba * development
  • pathos * development
  • pytest * development
  • scipy >=1.1.0 development
requirements-doc.txt pypi
  • Jinja2 *
  • brainpylib *
  • jaxlib >=0.3.0
  • matplotlib >=3.4
  • myst-nb *
  • numba *
  • pandoc *
  • scipy >=1.1.0
  • sphinx >=4
  • sphinx-autodoc-typehints *
  • sphinx-book-theme >=0.3.3
  • sphinx_thebe *
requirements.txt pypi
  • jax >=0.3.0
  • msgpack *
  • numpy >=1.15
  • tqdm *
setup.py pypi
  • jax >=0.3.0
  • msgpack *
  • numpy >=1.15
  • tqdm *