BrainPy: A general platform for computational neuroscience and brain-inspired computation
Project description
![Logo](docs/_static/logo.png)
[![LICENSE](https://anaconda.org/brainpy/brainpy/badges/license.svg)](https://github.com/PKU-NIP-Lab/BrainPy) [![Documentation](https://readthedocs.org/projects/brainpy/badge/?version=latest)](https://brainpy.readthedocs.io/en/latest/?badge=latest) [![Conda](https://anaconda.org/brainpy/brainpy-simulator/badges/version.svg)](https://anaconda.org/brainpy/brainpy-simulator) [![PyPI version](https://badge.fury.io/py/brainpy-simulator.svg)](https://badge.fury.io/py/brainpy-simulator) [![Build Status](https://travis-ci.com/PKU-NIP-Lab/BrainPy.svg?branch=master)](https://travis-ci.com/PKU-NIP-Lab/BrainPy)
# Why to use BrainPy
BrainPy is an integrative framework for computational neuroscience and brain-inspired computation. Three core functions are provided in BrainPy:
General numerical solvers for ODEs and SDEs (support for DDEs and FDEs will come soon).
Neurodynamics simulation tools for brain objects, such like neurons, synapses and networks (support for soma and dendrites will come soon).
Neurodynamics analysis tools for differential equations, including phase plane analysis and bifurcation analysis (support for continuation analysis and sensitive analysis will come soon).
Moreover, BrainPy is designed to effectively satisfy your basic requirements:
Easy to learn and use, because BrainPy is only based on Python language and has little dependency requirements;
Highly flexible and transparent, because BrainPy endows the users with the fully data/logic flow control;
Simulation can be guided with the analysis, because the same code in BrainPy can not only be used for simulation, but also for dynamics analysis;
Efficient running speed, because BrainPy is compatible with the latest JIT compilers or any other accelerating framework you prefer (below we list the speed comparison based on Numba JIT).
![Speed Comparison](docs/_static/speed.png)
BrainPy is a backend-independent neural simulator. Users can define models with any backend they prefer. Intrinsically, BrainPy supports the array/tensor-oriented backends such like [NumPy](https://numpy.org/), [PyTorch](https://pytorch.org/), and [TensorFlow](https://www.tensorflow.org/), it also supports the JIT compilers such as [Numba](https://numba.pydata.org/) on CPU or CUDA devices. Extending BrainPy to support other backend frameworks you prefer is very easy. The details please see documents coming soon.
# Installation
BrainPy is based on Python (>=3.7), and the following packages are required to be installed to use BrainPy:
NumPy >= 1.13
Matplotlib >= 3.3
Install BrainPy by using pip:
`bash > pip install -U brainpy-simulator `
Install BrainPy by using conda:
`bash > conda install brainpy-simulator -c brainpy `
Install BrainPy from source:
`bash > pip install git+https://github.com/PKU-NIP-Lab/BrainPy > # or > pip install git+https://git.openi.org.cn/OpenI/BrainPy > # or > pip install -e git://github.com/PKU-NIP-Lab/BrainPy.git@V1.0.0 `
# Let’s start
Website (including documentations): https://brainpy.readthedocs.io/
Source code: https://github.com/PKU-NIP-Lab/BrainPy or https://git.openi.org.cn/OpenI/BrainPy
Bug reports: https://github.com/PKU-NIP-Lab/BrainPy/issues or Email to adaduo@outlook.com
Examples from papers: https://brainmodels.readthedocs.io/en/latest/from_papers.html
Here list several simple examples for neurodynamics simulation and analysis. Comprehensive examples and tutorials please see [BrainModels](https://brainmodels.readthedocs.io).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.