Skip to content

Commit

Permalink
Merge pull request #12 from PKU-NIP-Lab/develop
Browse files Browse the repository at this point in the history
Version 0.2.4
  • Loading branch information
chaoming0625 committed Nov 17, 2020
2 parents 8b6c331 + cc574c1 commit 4e05915
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 30 deletions.
38 changes: 17 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,18 @@
*More features are coming soon. Contributions are welcome.*



Why to use BrainPy
=====================

``BrainPy`` is a lightweight framework based on latest Just-In-Time (JIT)
compilers. The goal of ``BrainPy`` is to provide
a highly flexible and efficient neural simulation framework for Python users.
``BrainPy`` is a lightweight framework based on the latest Just-In-Time (JIT)
compilers (especially `Numba <https://numba.pydata.org/>`_).
The goal of ``BrainPy`` is to provide a highly flexible and efficient
neural simulation framework for Python users.
It endows the users with the fully data/logic flow control.
The core of the framework is a micro-kernel, and it's easy to understand (see
*the document coming soon*).
Based on the kernel, the extension of the new models or the customization of the
data/logic flows are very simple for users. Ample examples (such as LIF neuron,
HH neuron, or AMPA synapse, GABA synapse and GapJunction) are also provided.
Besides the consideration of **flexibility**, for accelerating the running
**speed** of NumPy codes, `Numba` is used. For most of the times,
models running on `Numba` backend is very fast.
Besides highly flexible, BrainPy is very fast (see the following comparison figure).
Currently, BrainPy supports JIT acceleration on CPU. In future, we will
support GPU acceleration.

.. figure:: https://github.com/PKU-NIP-Lab/NumpyBrain/blob/master/docs/images/speed.png
:alt: Speed of BrainPy
Expand All @@ -53,15 +50,6 @@ models running on `Numba` backend is very fast.
Installation
============

Install ``BrainPy`` using ``conda``::

> conda install -c brainpy brainpy


Install ``BrainPy`` using ``pip``::

> pip install brain.py

Install from source code::

> git clone https://github.com/PKU-NIP-Lab/BrainPy
Expand All @@ -71,13 +59,21 @@ Install from source code::
>
> pip install git+https://github.com/PKU-NIP-Lab/BrainPy

Install ``BrainPy`` using ``conda``::

> conda install -c brainpy brainpy

Install ``BrainPy`` using ``pip``::

> pip install brain.py


The following packages need to be installed to use ``BrainPy``:

- Python >= 3.7
- NumPy >= 1.13
- Sympy >= 1.2
- Matplotlib >= 2.0
- Matplotlib >= 3.0
- autopep8

Packages recommended to install:
Expand Down
2 changes: 1 addition & 1 deletion brainpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

__version__ = "0.2.3"
__version__ = "0.2.4"

# "profile" module
from . import profile
Expand Down
4 changes: 3 additions & 1 deletion brainpy/core_system/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ def __init__(self,
if callable(extra_functions):
extra_functions = (extra_functions, )
try:
assert isinstance(extra_functions, (tuple, list)) and callable(extra_functions[0])
assert isinstance(extra_functions, (tuple, list))
if len(extra_functions):
assert callable(extra_functions[0])
except AssertionError:
raise ModelUseError('extra_functions must be a list/tuple of functions.')
self.extra_functions = extra_functions
Expand Down
6 changes: 3 additions & 3 deletions develop/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: brainpy
version: "0.2.3"
version: "0.2.4"

source:
path: ../../
Expand All @@ -15,12 +15,12 @@ requirements:
- setuptools>=40.0.0
- numpy>= 1.13
- sympy>=1.2
- numba>=0.40
- numba>=0.50
run:
- python
- numpy>=1.13
- sympy>=1.2
- numba>=0.40
- numba>=0.50
- matplotlib>=3.0
- setuptools>=40.0.0
- autopep8
Expand Down
10 changes: 10 additions & 0 deletions docs/apis/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Release notes
=============

BrainPy 0.2.4
-------------

API changes
~~~~~~~~~~~

- Fix bugs



BrainPy 0.2.3
-------------

Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy>=1.13
numba
matplotlib
sympy
numba>=0.50
matplotlib>=3.0
sympy>=1.2
autopep8
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
python_requires='>=3.7',
install_requires=[
'numpy>=1.15',
'matplotlib>=2.0',
'matplotlib>=3.0',
'sympy>=1.2',
'autopep8',
],
Expand Down

0 comments on commit 4e05915

Please sign in to comment.