Skip to content

Simple example of converting a Brian script into pure Python using numba

License

Notifications You must be signed in to change notification settings

thesamovar/cuba_with_and_without_brian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CUBA example with and without Brian

This repo is a simple example of converting a Brian script into pure Python using numba.

We start from the CUBA example included in Brian.

Run the code using Brian via Google Colab.

Next I manually converted this example to do exactly the same thing as Brian does, but in pure Python accelerated using the numba Python JIT compiler.

Run the code without Brian via Google Colab.

Or here's a version that uses vectorisation and NumPy instead of numba.

Run the code without Brian via Google Colab.

For this last one, you can copy/paste the content of the cell from the notebook into a new notebook using JupyterLite to run it locally in the browser rather than on Colab. This lets you run this example without a Google account.

I hope this might be somewhat helpful in understanding how Brian works behind the scenes, and in general what is involved in simulating a spiking neural network.

About

Simple example of converting a Brian script into pure Python using numba

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published