Release notes
=============
Brian 2.10.0
------------
New features
~~~~~~~~~~~~
- `PopulationRateMonitor` and `SpikeMonitor` now have a unified interface where both can provide
smoothed and binned firing rates with `~.RateMonitor.smooth_rate` and
`~.RateMonitor.binned_rate` (:issue:`1657`). Thanks to Mrigesh Thakur for implementing this
feature.
- Supplementing `Group.run_regularly` (which runs code at regular intervals), there is now a
`Group.run_at` method to run code at specific time points. Under the hood, it uses a new
`EventClock`, which can also be used directly, e.g. in a `StateMonitor` to record values
at specific times (:issue:`1602`). Thanks to Samuele De Cristofaro for implementing this
feature.
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The ``run_args`` feature could lead to a `ReferenceError` in some situations (:issue:`1673`).
Thanks to Lucas Binder for making us aware of this issue.
- The support for the GNU Scientific Library (GSL) was broken in C++ standalone mode
(:issue:`1687`), and another bug in our test suite meant that this problem stayed undetected.
Thanks to Maurizio De Pitta for making us aware of this issue.
- Time measurements (for profiling and for the progress report) were adding significant overhead
in C++ standalone mode, and measured processor instead of wall time (:issue:`1718`).
Thanks to Mathias Cauwet for contributing to the understanding of this issue.
- The ``.device.build(...clean=True)`` functionality was broken on Windows (:issue:`1721`).
Thanks to Daniel Müller-Komorowska for making us aware of the issue.
- The `~.Network.store`/`~.Network.restore` mechanism did not take into account synaptic delays
(:issue:`1726`).
- In C++ standalone mode, the default argument for ``make`` on Linux/macOS is no longer ``make -j``,
but instead uses the number of CPUs. This avoids using all system resources for big simulations,
trying to compile too many files in parallel (:issue:`1727`).
- Fewer spurious "unused object" warnings (:issue:`1724`).
- Restoring from disk now works regardless of whether the simulation used the Python or Cython
version of the spike queue (:issue:`1688`). Thanks to Mrigesh Thakur for contributing this fix.
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- We've switched our code-formatting and liniting used for pre-commit hooks to
`ruff `_, which reduces the number of dependencies and makes
the pre-commit checks faster (:issue:`1712`).
- To be in line with the major packages in the scientific Python ecosystem, we now also follow the
`SPEC-0 `_ policy for minimum dependencies
(:issue:`1700`).
- Various updates to out GitHub actions for testing and package building, making them more secure,
robust and faster due to better use of caches.
- The Python fallback for the spike queue has been removed, the Cython version is now mandatory.
The underlying C++ implementation is now used directly from within the Cython code
(:issue:`1649`, :issue:`1643`). Thanks to Mrigesh Thakur for his work on this, as
part of this year's Google Summer of Code.
- Dynamic arrays are now always using a C++ implementation, instead of having separate
implementations in runtime and standalone mode (:issue:`1650`). Thanks to Mrigesh Thakur for this
contribution.
- Random number and SpikeQueue state are now written to disk at the end of a standalone simulation,
preparing a feature to continue previous simulations (:issue:`1720`).
Backwards-incompatible changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Due to the removal of the Python fallback for the spike queue, and the use of a compiled
dynamic array in runtime mode, Brian can no longer run directly from its source directory without
installation. If you downloaded the source code (or cloned the git repository), you will therefore
have to install the package before using it; having the ``PYTHONPATH`` point to the source directory
is no longer sufficient. During development, you can use an
`editable install `_ to avoid
having to repeat the installation after each change. Note that this does not affect users that
install Brian in the usual way (e.g. with ``pip`` or ``conda``). This change only concerns
developers working on the source code directly.
Contributions
~~~~~~~~~~~~~
GitHub code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Mrigesh Thakur (`@Legend101Zz `_)
* Ayush (`@ayush4874 `_)
* Samuele De Cristofaro (`@De-Cri `_)
* Dan Goodman (`@thesamovar `_)
* `@itu-itis21-nguyen21 `_
* Mohamed Abidalrekab (`@abidalrekab `_)
* Silviya (`@silviyahasana `_)
* Guy Singer (`@guy-singer `_)
* Liam Keegan (`@lkeegan `_)
* `@Peace-png `_
* Maurizio DE PITTA (`@mdepitta `_)
* Sagar Shahari (`@maverick4code `_)
* Simo Vanni (`@sivanni `_)
* hillsberg (`@hillsberg3008 `_)
* Hong Zhu (`@Jasmine969 `_)
* `@mahipalimkar `_
* `@wcx12306 `_
Other contributions outside of GitHub (ordered alphabetically, apologies to
anyone we forgot...):
* Mathias Cauwet (`@macauwet `_)
* Chaitanya Chintaluri
Brian 2.9.0
-----------
New features
~~~~~~~~~~~~
- Simulations now stop "gracefully" if you interrupt them with Ctrl+C (or e.g. the interrupt button in a Jupyter notebook). This means that the simulation finishes the current time step and stops, making it possible to access the results for inspection (:issue:`1621`).
- The :ref:`linked_variables` mechanism is now more powerful and supports linked variables that use another variable for indexing, and linked variables in `Synapses` (:issue:`1584`).
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Improve C99 check on UNIX to avoid spurious errors when a non-standard compiler is used (e.g. via Anaconda) (:issue:`1618`).
- Raise an error when `~Network.run` is called with a negative duration (:issue:`1608`). Thanks to Palash Chitnavis for contributing this fix.
- Fix compatibility with recent setuptools versions (:issue:`1590`, :issue:`1622`)
- Raise an AttributeError instead of a KeyError, when accessing non-existing attributes of the preferences object (:issue:`1629`). This prevents an error on Google Collab when the Debugger is active. Thanks to forum user ``@SaeedF36`` for making us aware of this issue.
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- A new example :doc:`../examples/synapses.homeostatic_stdp_at_inhibitory_synapes`, demonstrating a homoestatic modulation of STDP, based on a population firing rate.
Thanks to Paul Brodersen for contributing this example (:issue:`1581`).
- A new example :doc:`../examples/network_operation_stop`, demonstrating the use of `NetworkOperation` to stop a simulation when a certain condition is met. Thanks to Sagar Shahari for
contributing this example (:issue:`1604`).
- GitHub Actions are now pinned by hash to avoid security issues (:issue:`1607`).
- A new GitHub Action to update ``CITATION.cff`` and ``README.md`` with the latest Zenodo and Software Heritage links, so that they are always up-to-date with the latest release (:issue:`1574`).
Contributions
~~~~~~~~~~~~~
GitHub code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Samuele De Cristofaro (`@De-Cri `_)
* Dan Goodman (`@thesamovar `_)
* Sagar Shahari (`@maverick4code `_)
* `@mahipalimkar `_
* Mrigesh Thakur (`@Legend101Zz `_)
* Md Khurshid (`@alikhere `_)
* Palash Chitnavis (`@PalashChitnavis `_)
* Ben Evans (`@bdevans `_)
* `@clinssen `_
* shriyaise725 (`@shriya7ise `_)
* Ankur Sinha (`@sanjayankur31 `_)
* Hong Zhu (`@Jasmine969 `_)
* 火焰青年 (`@zhengrenjie `_)
Brian 2.8.0.1-2.8.0.4
---------------------
Several patch-level releases, correcting metadata files about authors and contributors, updating release scripts, and fixing issues in a test and in the
continuous integration infrastructure. Wheel packages for linux-aarch64 are now built on GitHub's recently added ARM runners, removing the need for emulation
and greatly improving the built time. No other user-facing changes are included in this release.
Contributions
~~~~~~~~~~~~~
GitHub code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
Brian 2.8.0
-----------
This release comes with an important performance improvement for random number generation in C++ standalone mode, various minor improvements and bugfixes, as well as a
number of behind-the-scenes improvements for our release process and compatibility with Python 3.13.
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Faster simulation of random numbers (by replacing our outdated random number generator), now up to 5 times faster, speeding up all uses of random numbers
including noise and Poisson groups/inputs. Note that the random number algorithm behind the scenes is still the same, so simulations will still use the
same sequence of random numbers with a given seed, with the limitations given in :ref:`seeding_and_reproducibility` (:issue:`1559`).
- `~CPPStandaloneDevice.delete` has a new option to delete arrays stored on disk for the ``run_args`` feature – this can be useful for training paradigms,
where the ``run_args`` are used to provide a large array of weights from a previous run.
- Fixes for compatiblity with recent versions of ``setuptools`` and ``sympy``. Thanks to Étienne Mollier for noticing and fixing a related test failure (:issue:`1553`).
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Full compatibility with Python 3.13, and corresponding binary wheels.
- A new mechanism to automatically update our ``CITATION.cff`` and README files with the latest links to the Zenodo and Software Heritage archives, so that they are
always up-to-date with the latest release (:issue:`1575`).
- We now provide a ``codemeta.json`` file for Brian (see https://codemeta.github.io; :issue:`1574`).
- We know push docker images for the latest release to the GitHub Container Registry (see https://github.com/brian-team/brian2/pkgs/container/brian and https://github.com/brian-team/brian2/pkgs/container/brian-dev) in addition to Docker Hub (:issue:`1551`).
- New example: :doc:`../examples/frompapers.Diehl_Cook_2015` – note that this example needs a long time to run, a faster version using C++ standalone mode is in preparation.
Thanks to Björn A. Lindqvist for contributing this example (:issue:`1548`).
Contributions
~~~~~~~~~~~~~
GitHub code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* `@neworderofjamie `_
* `@NickChernov `_
* Kyle Johnsen (`@kjohnsen `_)
* Liam Keegan (`@lkeegan `_)
* Étienne Mollier (`@emollier `_)
* Bernhard Vogginger (`@bvogginger `_)
* Dan Goodman (`@thesamovar `_)
* `@Treetalker `_
* Björn Lindqvist (`@bjourne `_)
* `@wcx12306 `_
Brian 2.7.1
-----------
This minor bug-fix release contains a fix for a regression in the handling of the ``on_event`` argument of `Synapses` for custom events and non-default pathways,
which was introduced in Brian 2.6.0.
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Fix a bug in interpreting the ``on_event`` argument of `Synapses` for custom events and non-default pathways (a regression introduced with Brian 2.6). Thanks to forum users
``mreynes`` and ``mmiekus`` for making us aware of this issue. (:issue:`1541`)
- Make parsing SWC files more robust, by not being as strict for a correct 3-point-soma format (which is often slightly inexact on https://neuromorpho.org). Thanks to forum
user ``cbx`` for making us aware of this issue. (:issue:`1544`)
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Move to ``pytest-cov`` for coverage measurements – this fixes issues with wrong coverage reports on https://coveralls.io/github/brian-team/brian2. (:issue:`1545`)
Contributions
~~~~~~~~~~~~~
GitHub code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* `@mareba2030 `_
* Björn Lindqvist (`@bjourne `_)
Other contributions outside of GitHub (ordered alphabetically, apologies to
anyone we forgot...):
* `cbx `_
* `mmiekus `_
* `mreynes `_
Brian 2.7.0
-----------
This release contains a number of bug fixes and improvements. Notably, it is fully compatible with the upcoming numpy 2.0 release and can be installed
alongside either numpy versions 1.23–1.26, or numpy 2.0.
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Objects (e.g. `NeuronGroup` or `Synapses`) that are not used now raise warnings, avoiding errors for accidentally unused objects (:issue:`1536`). Thanks
to Jannik Luboeinski for suggesting this feature.
- Fix the :doc:`run_args <../user/computation>` feature for object names with upper case letters (:issue:`1533`). Thanks to DavidKing2020 for making us aware of this issue.
- Extremely short refractoriness periods were not converted into code correctly, truncating their value (:issue:`1521`). Thanks to YannaelB for reporting this issue.
- The numbers 0 and 1 were converted into ``true``/``false`` in C++ code, breaking tests expecting the numbers to appear (:issue:`1520`)
- The logging system was broken for 3rd-party packages that have names starting with ``brian`` (:issue:`1519`)
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The reference documentation was not correctly built, missing a lot of the information present in the source code. Thanks to Harsh Khilawala for making us aware of
this issue (:issue:`1534`)
- Binary wheels are built against numpy 2.0. These wheels are still backwards compatible with numpy >= 1.23 (:issue:`1527`)
- Faster tests on GitHub actions by caching the compiled Cython code (:issue:`1528`)
- The test suite was no longer testing the GSL integration (:issue:`1523` and :issue:`1526`)
- Brian no longer includes the date in its documentation for `reproducible builds `_ (:issue:`1518`).
Contributions
~~~~~~~~~~~~~
GitHub code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Dan Goodman (`@thesamovar `_)
* Harsh Khilawala (`@HarshKhilawala `_)
* Ben Evans (`@bdevans `_)
* Jannik Luboeinski (`@jlubo `_)
* `@flomlo `_
* Sven Leach (`@SvennoNito `_)
Other contributions outside of GitHub (ordered alphabetically, apologies to
anyone we forgot...):
* `DavidKing2020 `_
* `YannaelB `_
Brian 2.6.0
-----------
This release introduces a major new feature for running standalone simulations repeatedly (or in parallel), without having to recompile the code.
It also fixes a number of compatiblity issues with the upcoming numpy 2.0 release, and offers compiled wheels for Python 3.12. Finally, we now
offer pre-built docker images containing a full installation of Brian and related tools for convenient testing and development.
New features
~~~~~~~~~~~~
- The new ``run_args`` argument makes it possible to run standalone simulations repeatedly (or in parallel) with different parameters without
recompiling the code. See :ref:`standalone_multiple_full_runs` for details (:issue:`1429`).
- We now provide regularly updated Docker images with a full installation of Brian and related tools. You can find the latest release images
on https://hub.docker.com/repository/docker/briansimulator/brian/general, and temporary images for development versions on
https://hub.docker.com/repository/docker/briansimulator/brian-dev/general
(:issue:`1503`).
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Various fixes for compatibility with recent Python versions and the future numpy 2.0 release (:issue:`1482`, :issue:`1484`, :issue:`1488`, :issue:`1510`).
- Do not assume that the test directory is writeable (:issue:`1507``)
- Fix the power operator for integer values in Cython (:issue:`1502`). Thanks to Hong Zhu for reporting this issue.
- Fix floor division on C++ (:issue:`1496`). Thanks to Brian forum user ``ansuz`` for reporting this issue.
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- We now build wheels and test against for Python 3.12 (:issue:`1481`).
- We now build and test on Apple Silicon (M1) hardware (:issue:`1501`).
- Improved support for 3rd-party packages to use Brian's logging system (:issue:`1480`).
- New examples: :doc:`../examples/frompapers.Spreizer_et_al_2019.Spreizer_et_al_2019`, :doc:`../examples/frompapers.Wang_2002` (:issue:`1447`, :issue:`1489`)
- Use dependabot to keep GitHub actions and the dev container up-to-date (:issue:`1513`).
Contributions
~~~~~~~~~~~~~
GitHub code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Ben Evans (`@bdevans `_)
* Jannik Luboeinski (`@jlubo `_)
* Dan Goodman (`@thesamovar `_)
* Arash Golmohammadi (`@arashgmn `_)
* xyz (`@DHRUVJ2003 `_)
* Kyle Johnsen (`@kjohnsen `_)
* McCoy R. Becker (`@femtomc `_)
* Max Talanov (`@max-talanov `_)
* `@lysea-haggie `_
* Hong Zhu (`@Jasmine969 `_)
* Paul Brodersen (`@paulbrodersen `_)
* `@MichielMoe `_
* Ian Quah (`@IanQS `_)
* Adam Willats (`@awillats `_)
* `@flomlo `_
Other contributions outside of GitHub (ordered alphabetically, apologies to
anyone we forgot...):
* `ansuz `_`
* `@l-luo1 _``
* Klaus Wimmer (`@wklausitor _`)
Brian 2.5.4
-----------
Yet another minor release that fixes an issue with the documentation build. As a bonus, we now provide wheels built
with the `musl `_ standard library, which allows installing Brian on distributions such as
`Alpine Linux `_.
Selected bug fixes
~~~~~~~~~~~~~~~~~~
- Re-introduce the tutorials and example plots that were omitted from the documentation by accident. Thanks to Felix Kern for making us aware of the issue.
Infrastructure improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Provide ``musllinux`` (see `PEP 656 `_) wheels for distributions such as Alpine Linux (:issue:`1478`).
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Felix Benjamin Kern (`@kernfel `_)
Brian 2.5.3
-----------
This new minor release only fixes two infrastructure issues that came up with the previous release.
Selected bug fixes
~~~~~~~~~~~~~~~~~~
- Re-introduce the reference documentation that was no longer created on https://brian2.readthedocs.org with the latest release (:issue:`1474`). Thanks to Michalis Pagkalos for making us aware of the issue.
Infrastructure improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Brian's packaging infrastructure now switches to modern tools such as ``pyproject.toml`` for metadata declaration, ``build`` for source package creation, and ``setuptools_scm`` for versioning (:issue:`1475`).
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
Brian 2.5.2
-----------
This new minor release fixes incompatibility issues with the latest numpy release, and a number of other issues.
To make it easier to contribute to Brian, we have now adopted a consistent code style and updated our infrastructure so
that the style gets enforced for all new code contributions (see :ref:`code_style` for details). Following
`NEP 29 `_, this release supports Python 3.9 & numpy 1.21 and
newer.
New features
~~~~~~~~~~~~
- We now provide Python wheels for the ``linux-aarch64`` architecture (:issue:`1463`), making it easier to install Brian
on ARM-based systems running Linux (including recent Apple hardware).
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Fix compability with numpy 1.25 and avoid deprecation warnings (:issue:`1473`)
- Add missing ``volume`` attribute to `~.SpatialNeuron` (:issue:`1430`). Thanks to Sebastian Schmitt for contributing this
fix.
- Fix an issue with pickling `~.Quantity` objects (:issue:`1438`). Thanks to Shailesh Appukuttan for making us aware of
this issue.
- No longer use the deprecated ``distutils`` package (:issue:`1442`).
- Fix an issue with log files on Windows (:issue:`1454`). Thanks to discourse user
``@NiKnight`` for making us aware of the issue.
- Fix an issue that prevents building the documentation on recent Python versions (:issue:`1450`). Thanks to Étienne
Mollier for contributing this fix.
- Fix an issue with the upcoming Cython version for GSL integration (:issue:`1471`).
- Fix a broken error message (:issue:`1467`). Thanks to ``@pjsph`` for contributing the fix.
- Fix an issue with user-provided header files (:issue:`1436`). Thanks to ``@wxie2013`` for reporting the issue.
- Fix an issue when using `SpatialNeuron` with `TimedArray` on Cython (:issue:`1428`). Thanks to Sebastian Schmitt for
reporting the issue.
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- We now enforce a consistent code style for all new code contributions, and check/enforce the code style with tools
such as ``black``, ``isort``, ``flake8``, and ``pyupgrade`` (:issue:`1435`, :issue:`1444`, :issue:`1446`).
See :ref:`code_style` for details. Thanks to Oleksii Leonov for contributing this feature.
- A number of new examples have been added: :doc:`../examples/frompapers.Tetzlaff_2015`, :doc:`../examples/frompapers.Nicola_Clopath_2017`
(contributed by Sebastian Schmitt) and :doc:`../examples/coupled_oscillators`.
- The development container has been updated, and the repository now contains a file with all the places where
dependency versions are listed (:issue:`1451`, :issue:`1468`).
Backwards incompatible changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Using `SpatialNeuron` with the ``numpy`` code generation target now requires the ``scipy`` package to be installed
(:issue:`1460`).
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Dan Goodman (`@thesamovar `_)
* Ben Evans (`@bdevans `_)
* Oleksii Leonov (`@oleksii-leonov `_)
* Sebastian Schmitt (`@schmitts `_)
* Denis Alevi (`@denisalevi `_)
* Shailesh Appukuttan (`@appukuttan-shailesh `_)
* `@TheSquake `_
* `@tim-ufer `_
* Akalanka (`@boneyag `_)
* `@pjsph `_
* `@Bitloader22 `_
* `@MunozatABI `_
* Étienne Mollier (`@emollier `_)
* `@KarimHabashy `_
* `@hunjunlee `_
* Arash Golmohammadi (`@arashgmn `_)
* Steathy Spikes (`@steathy-spikes `_)
* Adam Willats (`@awillats `_)
Other contributions outside of github (ordered alphabetically, apologies to
anyone we forgot...):
* `@NiKnight `_
Brian 2.5.1
-----------
This new minor release contains a large number of bug fixes and improvements, in particular for the C++ standalone mode,
as well as many new contributed examples. For users of Visual Studio Code, getting involved with Brian development is now
easier than ever, thanks to a new "development container" that automatically provides an environment with all the necessary
dependencies.
New features
~~~~~~~~~~~~
* Ben Evans added a Docker container for development with Visual Studio Code (:issue:`1387`).
* Synaptic indices of synapses created with manually provided indices can now be accessed in standalone mode even before
the situation has been run. This makes certain complex situations (e.g. synapses modulating other synapses) easier to
write and also makes more detailed error checking possible (:issue:`1403`).
* Additional "code slots", as well as more detailed profiling information about compilation times are avaiable for
C++ standalone mode (:issue:`1390`, :issue:`1391`). Thanks to Denis Alevi for contributing this feature.
* LaTeX output for quantity arrays (which is automatically used for the "rich representation" in jupyter notebooks), is
now limited to reasonable size and no longer tries to display all values for large arrays. It now also observes most
of numpy's print options (:issue:`1426`)
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Internally, Brian objects now have more consistent names (used in the generated code), and variables declarations are
generated in deterministic order. This should make repeated runs of models faster, since less code has to be recompiled
(:issue:`1384`, :issue:`1417`).
* Running several simulations in parallel with Python's ``multiprocessing`` meant that all processes accessed the same
log file which led to redundant information and could lead to crashes when several processes tried to rotate the same
file. Brian now switches off logging in subprocesses, but users can enable also enable individual logs for each process,
see :ref:`logging_and_multiprocessing`. The default log level for the file log has also been raised to ``DEBUG``
(:issue:`1419`).
* Some common plotting idioms (e.g. ``plt.plot(spike_mon.t/ms, spike_mon.i, '.')``) were broken with the most recent
matplotlib version and are now working again (:issue:`1412`)
* Very long runs (with more then 2e9 simulation time steps) failed to run in C++ standalone mode (:issue:`1394`). Thanks to
Kai Chen for making us aware of the issue.
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Sebastian Schmitt has contributed several new :doc:`../examples/index`, reproducing results from several papers (e.g.
:doc:`../examples/frompapers.Maass_Natschlaeger_Markram_2002` and :doc:`../examples/frompapers.Naud_et_al_2008_adex_firing_patterns`)
* Akif Erdem Sağtekin and Sebastian Schmitt contributed the example :doc:`../examples/frompapers.Izhikevich_2003`.
* A number of fixes to the documentation have been contributed by Sebastian Schmitt.
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Ben Evans (`@bdevans `_)
* Sebastian Schmitt (`@schmitts `_)
* Denis Alevi (`@denisalevi `_)
* Akif Erdem Sağtekin (`@aesagtekin `_)
* `@MunozatABI `_
* Dan Goodman (`@thesamovar `_)
* `@ivapl `_
* `@dokato `_
* Davide Schiavone (`@davideschiavone `_)
* Kai Chen (`@NeoNeuron `_)
* Yahya Ashrafi (`@yahya-ashrafi `_)
* Ariel Martínez Silberstein (`@ariel-m-s `_)
* Adam Willats (`@awillats `_)
Brian 2.5.0.3
-------------
Another patch-level release that fixes incorrectly built Python wheels (the binary package
used to install packages with ``pip``). The wheels where mistakenly built against the most
recent version of ``numpy`` (1.22), which made them incompatible with earlier versions of
``numpy``. This release also fixes a few minor mistakes in the string representation of
monitors, contributed by Felix Benjamin Kern.
Brian 2.5.0.2
-------------
A new patch-level release that fixes a missing ``#include`` in the synapse generation code for C++ standalone code. This
does not matter for most compilers (in particular, it does not matter for the gcc, clang, and Visual Studio compilers
that we use for testing on Linux, OS X, and Windows), but it can matter for projects like Brian2GeNN that build on top
of Brian2 and use Nvidia's ``nvcc`` compiler. The release also fixes a minor string-formatting error (:issue:`1377`),
which led to quantities that were displayed without their units.
Brian 2.5.0.1
-------------
A new build to provide binary
`wheels `_
for Python 3.10.
.. _brian2.5:
Brian 2.5
---------
This new major release contains a large number of bug fixes and improvements, as well as
important new features for synapse generation: the :ref:`generator_syntax` can now
create synapses "in both directions", and also supports random samples of fixed size.
In addition, several contributors have helped to improve the documentation, in
particular by adding several new :doc:`../examples/index`. We have also updated our test
infrastructure and removed workarounds and warnings related to older, now unsupported,
versions of Python. Our policy for supported Python and numpy versions now follows the
`NEP 29 policy `_ adopted by
most packages in the scientific Python ecosystem. This and other policies related to
compatibility have been documented in :doc:`compatibility`. As always, we recommend all
users of Brian 2 to upgrade.
New features
~~~~~~~~~~~~
* :ref:`generator_syntax` has become more powerful: it is now possible to express
pre-synaptic indices as a function of post-synaptic indices – previously, only the
other direction was supported (:issue:`1294`).
* Synapse generation can now make use of fixed-size random sampling (:issue:`1280`).
Together with the more powerful generator syntax, this finally makes it possible to
have networks where each cell receives a fixed number of random inputs:
``syn.connect(i='k for k in sample(N_pre, size=number_of_inputs)')``.
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Fair default build flags on several architectures (:issue:`1277`). Thanks to Étienne
Mollier for contributing this feature.
* Better C++ compiler detection on UNIX systems, e.g. with Anaconda installations
(:issue:`1304`). Thanks to Jan Marker for this contribution.
* Fixed LaTeX output for newer sympy versions (:issue:`1299`). Thanks to Sebastian
Schmitt for reporting this issue. The problem and its fix is described in detail
in this `blog post `_.
* Fixed string representation for units (:issue:`1291`). Recreating a unit from
its string representation gave wrong results in some corner cases.
* Fix an error during the determination of appropriate C++ compiler flags on Windows
with Python 3.9 (:issue:`1286`), and fix the detection of a C99-compatible compiler
on Windows (:issue:`1257`). Thanks to Kyle Johnsen for reporting the errors
and providing both fixes.
* More robust usage of external constants in C++ standalone code, avoiding clashes
when the user defines constants with common names like ``x`` (:issue:`1279`). Thanks
to user ``@wxie2013`` for making us aware of this issue.
* Raise an error if summed variables refer to event-based variables (:issue:`1274`) and
a general rework of the dependency checks (:issue:`1328`). Thanks to Rohith Varma
Buddaraju for fixing this issue.
* Fix an error for deactivated spike-emitting objects (e.g. `NeuronGroup`,
`PoissonGroup`). They continued to emit spikes despite ``active=False`` if they had
spiked in the last time step of a previous run (:issue:`1319`). Thanks to forum user
Shencong for making us aware of the issue.
* Avoid warnings about deprecated numpy aliases (:issue:`1273`).
* Avoid a warning about an "ignored attribute shape" in some interactive Python
consoles (:issue:`1372`).
* Check units for summed variables (:issue:`1361`). Thanks to Jan-Hendrik Schleimer for
reporting this issue.
* Do not raise an error if synapses use restore instead of Synapses.connect
(:issue:`1359`). Thanks to forum user SIbanez for reporting this issue.
* Fix indexing for sections in SpatialNeuron (:issue:`1358`). Thanks to Sebastian
Schmitt for reporting this issue
* Better error messages for missing threshold definition (:issue:`1363`).
* Raise a useful error for ``namespace`` entries that start with an underscore instead
of failing during compilation if the name clashes with built-in functions
(:issue:`1362`). Thanks to Denis Alevi for reporting this issue.
* Consistently use include/library directory preferences (:issue:`1353`). The
preferences can now be used to override the list of include/library directories,
replacing the inconsistent behavior where they were either prepended (C++ standalone
mode) or appended (Cython runtime mode) to the default list. Thanks to Denis Alevi for
opening the discussion on this issue.
* Remove a warning about the difference between Python 2 and Python 3 semantics related
to division (:issue:`1351`).
* Do not generate spurious ``-.o`` files when checking compiler compatibility
(:issue:`1348`). For more details, see this
`blog post `_.
* Make `~.BrianGlobalPreferences.reset_to_defaults` work again, which was inadvertently
broken in the Python 2 → 3 transition (:issue:`1342`). Thanks to Denis Alevi for
reporting and fixing this issue.
* The commands to run and compile the code in C++ standalone mode can now be changed via
a preference (:issue:`1338`). This can be useful to run/compile on clusters where
jobs have to submitted with special commands. Thanks to Denis Alevi for contributing
this feature.
Backward-incompatible changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* The ``default_preferences`` file that was part of the Brian installation has been
removed, since it could lead to problems when working with development versions of
Brian, and was overwritten with each update (:issue:`1354`). Users can still use a
system-wide or per-directory preference file (see :doc:`../advanced/preferences`).
* The preferences `codegen.cpp.include_dirs`, `codegen.cpp.library_dirs`, and
`codegen.cpp.runtime_library_dirs` now all replace the respective default values.
Previously they where prepended (C++ standalone mode) or appended (Cython runtime
mode). Users relying on a combination of the default values and their manually set
values need to include the default value (e.g.
``os.path.join(sys.prefix, 'include')``) manually.
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Tagging a release will now automatically upload the release to PyPI via a GitHub
Action. Versions are automatically determined with
`versioneer `_ (:issue:`1267`)
and include more detailed information when using a development version of Brian. See
:ref:`which_version` for more details.
* The test suite has been moved to GitHub Actions for all operating systems
(:issue:`1298`). Thanks to Rohith Varma Buddaraju for working on this.
* New :doc:`../examples/frompapers.Jansen_Rit_1995_single_column` (:issue:`1347`),
contributed by Ruben Tikidji-Hamburyan.
* New :doc:`../examples/synapses.spike_based_homeostasis` (:issue:`1331`), contributed
by Sebastian Schmitt.
* New :doc:`../examples/advanced.COBAHH_approximated` (:issue:`1309`), contributed by
Sebastian Schmitt.
* Several new examples covering several Brian usage pattern, e.g. a
:doc:`minimal C++ standalone script <../examples/standalone.simple_case>`, or
demonstrations of running multiple simulations in parallel with
:doc:`Cython <../examples/multiprocessing.01_using_cython>` or
:doc:`C++ standalone <../examples/multiprocessing.02_using_standalone>`, contributed
by A. Ziaeemehr.
* Corrected units in :doc:`../examples/frompapers.Kremer_et_al_2011_barrel_cortex`
(:issue:`1355`). Thanks to Adam Willats for contributing this fix.
* Most of Brian's code base should now use a consistent string formatting style
(:issue:`1364`), documented in the :doc:`../developer/guidelines/style`.
* Test reports will now show the project directory path for C++ standalone projects
(:issue:`1336`). Thanks to Denis Alevi for contributing this feature.
* Fix the documentation for C++ compiler references (:issue:`1323`, :issue:`1321`).
Thanks to Denis Alevi for fixing these issues.
* Examples are now listed in a deterministic order in the documentation (:issue:`1312`),
and their title is now correctly formatted in the restructured text source
(:issue:`1311`). Thanks to Felix C. Stegermann for contributing these fixes.
* Document how to plot model functions (e.g. time constants) in complex neuron models
(:issue:`1308`). Contributed by Sebastian Schmitt.
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Dan Goodman (`@thesamovar `_)
* Rohith Varma Buddaraju (`@rohithvarma3000 `_)
* Denis Alevi (`@denisalevi `_)
* Dingkun.Liu (`@DingkunLiu `_)
* Ruben Tikidji-Hamburyan (`@rat-h `_)
* Sebastian Schmitt (`@schmitts `_)
* `@ramapati166 `_
* Jan Marker (`@jangmarker `_)
* Kyle Johnsen (`@kjohnsen `_)
* Abolfazl Ziaeemehr (`@Ziaeemehr `_)
* Felix Benjamin Kern (`@kernfel `_)
* Yann Zerlaut (`@yzerlaut `_)
* Adam (`@Adam-Antios `_)
* `@ShanqMa `_
* Ljubica Cimeša (`@LjubicaCimesa `_)
* `@adididi `_
* VigneswaranC (`@Vigneswaran-Chandrasekaran `_)
* Nunna Lakshmi Saranya (`@18sarru `_)
* Friedemann Zenke (`@fzenke `_)
* `@Alexis-Melot `_
* Adam Willats (`@awillats `_)
* Felix C. Stegerman (`@obfusk `_)
* Eugen Skrebenkov (`@shcecter `_)
* Maurizio DE PITTA (`@mdepitta `_)
* Simo (`@sivanni `_)
* Peter Quitta (`@peschn `_)
* Étienne Mollier (`@emollier `_)
* chaddy (`@chaddy1004 `_)
* `@DePasquale99 `_
* `@albertalbesa `_
* Christian Behrens (`@chbehrens `_)
Other contributions outside of github (ordered alphabetically, apologies to
anyone we forgot...):
* forum user `Shencong `_
* forum user `SIbanez `_
Brian 2.4.1
-----------
This is a bugfix release with a number of small fixes and updates to the continuous
integration testing.
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* The `check_units` decorator can now express that some arguments need to have the same
units. This mechanism is now used to check the units of the `clip` function
(:issue:`1234`). Thanks to Felix Kern for notifying us of this issue.
* Using `SpatialNeuron` with Cython no longer raises an unnecessary warning when the
``scipy`` library is not installed (:issue:`1230`).
* Raise an error for references to ``N_incoming`` or ``N_outgoing`` in calls to
`Synapses.connect`. This use is ill-defined and led to compilation errors in previous
versions (:issue:`1227`). Thanks to Denis Alevi for making us aware of this issue.
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Brian no longer officially supports installation on 32bit operating systems.
Installation via ``pip`` will probably still work, but we are no longer testing this
configuration (:issue:`1232`).
* Automatic continuous integration tests for Windows now use the
`Microsoft Azure Pipeline `_
infrastructure instead of `Appveyor `_. This should speed
up tests by running different configurations in parallel (:issue:`1233`).
* Fix an issue in the test suite that did not handle ``NotImplementedError`` correctly
anymore after the changes introduced with :issue:`1196`.
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Dan Goodman (`@thesamovar `_)
* Denis Alevi (`@denisalevi `_)
* SK (`@akatav `_)
Other contributions outside of github (ordered alphabetically, apologies to
anyone we forgot...):
* Felix B. Kern
Brian 2.4
---------
This new release contains a large number of small improvements and bug fixes. We
recommend all users of Brian 2 to upgrade. The biggest code change of this new version
is that Brian is now Python-3 only (thanks to Ben Evans for working on this).
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Removing objects from networks no longer fails (:issue:`1151`). Thanks to Wilhelm
Braun for reporting the issue.
* Point currents marked as ``constant over dt`` are now correctly handled
(:issue:`1160`). Thanks to Andrew Brughera for reporting the issue.
* Elapsed and estimated remaining time are now formatted as hours/minutes/etc.
in standalone mode as well (:issue:`1162`). Thanks to Rahul Kumar Gupta,
Syed Osama Hussain, Bhuwan Chandra, and Vigneswaran Chandrasekaran for working
on this issue as part of the GSoC 2020 application process.
* To prevent log files filling up the disk (:issue:`1188`), their file size is now limited to
10MB (configurable via the `logging.file_log_max_size` preference). Thanks to
Rike-Benjamin Schuppner for contributing this feature.
* Add more complete support for operations on `.VariableView` attributes. Previously,
operations like ``group.v**2`` failed and required the workaround ``group.v[:]**2`` (:issue:`1195`)
* Fix a number of compatibility issues with newer versions of numpy and sympy, and document our policy
on :doc:`compatibility`.
* File locking (used to avoid problems when running multiple simulations in parallel) is now based on
Benedikt Schmitt's `py-filelock `_ package, which
should hopefully make it more robust.
* String expressions in `Synapses.connect` are now checked for syntactic correctness
before handing them over to the code generation process, improving error messages.
Thanks to Denis Alevi for making us aware of this issue. (:issue:`1224`)
* Avoid duplicate messages in "chained" exceptions. Also introduces a new preference
`logging.display_brian_error_message` to switch off the "Brian 2 encountered an unexpected
error" message (:issue:`1196`).
* Brian's unit system now correctly deals with matrix multiplication, including the
``@`` operator (:issue:`1216`). Thanks to `@kjohnsen `_
for reporting this issue.
* Avoid turning all integer numbers in equations into floating point values (:issue:`1202`).
Thanks to Marco K. for making us aware of this issue.
* New attributes `.Synapses.N_outgoing_pre` and `.Synapses.N_incoming_post` to access
the number of synapses per pre-/post-synaptic cell (see
:ref:`accessing_synaptic_variables` for details; :issue:`1225`)
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Ben Evans (`@bdevans `_)
* Dan Goodman (`@thesamovar `_)
* Denis Alevi (`@denisalevi `_)
* Rike-Benjamin Schuppner (`@Debilski `_)
* Syed Osama Hussain (`@Syed-Osama-Hussain `_)
* VigneswaranC (`@Vigneswaran-Chandrasekaran `_)
* Tushar (`@smalltimer `_)
* Felix Hoffmann (`@felix11h `_)
* Rahul Kumar Gupta (`@rahuliitg `_)
* Dominik Spicher (`@dspicher `_)
* `@nfzd `_
* `@Snow-Crash `_
* `@cnjackhu `_
* `@neurologic `_
* `@kjohnsen `_
* Ashwin Viswanathan Kannan (`@ashwin4ever `_)
* Bhuwan Chandra (`@zeph1yr `_)
* Wilhelm Braun (`@wilhelmbraun `_)
* `@cortical-iv `_
* Eugen Skrebenkov (`@shcecter `_)
* `@Aman-A `_
* Felix Benjamin Kern (`@kernfel `_)
* Francesco Battaglia (`@fpbattaglia `_)
* Shivam Chitnis (`@shivChitinous `_)
* Marco K. (`@spokli `_)
* `@jcmharry `_
* Friedemann Zenke (`@fzenke `_)
* `@Adam-Antios `_
Other contributions outside of github (ordered alphabetically, apologies to
anyone we forgot...):
* Andrew Brughera
* William Xavier
.. _brian2.3:
Brian 2.3
---------
This release contains the usual mix of bug fixes and new features (see below), but
also makes some important changes to the Brian 2 code base to pave the way for
the full Python 2 -> 3 transition (the source code is now directly compatible with
Python 2 and Python 3, without the need for any translation at install time). Please
note that this release will be the last release that supports
Python 2, given that Python 2 reaches end-of-life in January 2020. Brian now also uses
`pytest `_ as its testing framework, since the previously used
``nose`` package is not maintained anymore. Since `brian2hears `_
has been released as an independent package, using `brian2.hears` as a "bridge" to
Brian 1's ``brian.hears`` package is now deprecated.
Finally, the Brian project has adopted the "Contributor Covenant"
:doc:`code_of_conduct`, pledging "to make participation in our community a
harassment-free experience for everyone".
New features
~~~~~~~~~~~~
* The `restore` function can now also restore the state of the random number generator,
allowing for exact reproducibility of stochastic simulations (:issue:`1134`)
* The functions `expm1`, `log1p`, and `exprel` can now be used (:issue:`1133`)
* The system for calling random number generating functions has been generalized (see
:ref:`function_vectorisation`), and a new `poisson` function for Poisson-distrubted
random numbers has been added (:issue:`1111`)
* New versions of Visual Studio are now supported for standalone mode on Windows
(:issue:`1135`)
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* `~brian2.groups.group.Group.run_regularly` operations are now included in the network, even if they are
created after the parent object was added to the network (:issue:`1009`).
Contributed by `Vigneswaran Chandrasekaran `_.
* No longer incorrectly classify some equations as having "multiplicative noise" (:issue:`968`).
Contributed by `Vigneswaran Chandrasekaran `_.
* Brian is now compatible with Python 3.8 (:issue:`1130`), and doctests are compatible
with numpy 1.17 (:issue:`1120`)
* Progress reports for repeated runs have been fixed (:issue:`1116`), thanks to Ronaldo
Nunes for reporting the issue.
* `SpikeGeneratorGroup` now correctly works with `restore` (:issue:`1084`), thanks to
Tom Achache for reporting the issue.
* An indexing problem in `PopulationRateMonitor` has been fixed (:issue:`1119`).
* Handling of equations referring to ``-inf`` has been fixed (:issue:`1061`).
* Long simulations recording more than ~2 billion data points no longer crash with a
segmentation fault (:issue:`1136`), thanks to Rike-Benjamin Schuppner for reporting
the issue.
Backward-incompatible changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* The fix for `~brian2.groups.group.Group.run_regularly` operations (:issue:`1009`, see above) entails
a change in how objects are stored within `Network` objects. Previously, `Network.objects` stored a
complete list of all objects, including objects such as `~brian2.groups.neurongroup.StateUpdater` that
– often invisible to the user – are a part of major objects such as
`NeuronGroup`. Now, `Network.objects` only stores the objects directly
provided by the user (`NeuronGroup`, `Synapses`, `StateMonitor`, ...), the
dependent objects (`~brian2.groups.neurongroup.StateUpdater`, `~brian2.groups.neurongroup.Thresholder`, ...) are taken into account
at the time of the run. This might break code in some corner cases, e.g.
when removing a `~brian2.groups.neurongroup.StateUpdater` from `Network.objects` via `Network.remove`.
* The `brian2.hears` interface to Brian 1's ``brian.hears`` package has been deprecated.
Infrastructure and documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* The same code base is used on Python 2 and Python 3 (:issue:`1073`).
* The test framework uses ``pytest`` (:issue:`1127`).
* We have adapoted a Code of Conduct (:issue:`1113`), thanks to Tapasweni Pathak for the
suggestion.
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Dan Goodman (`@thesamovar `_)
* Vigneswaran Chandrasekaran (`@Vigneswaran-Chandrasekaran `_)
* Moritz Orth (`@morth `_)
* Tristan Stöber (`@tristanstoeber `_)
* `@ulyssek `_
* Wilhelm Braun (`@wilhelmbraun `_)
* `@flomlo `_
* Rike-Benjamin Schuppner (`@Debilski `_)
* `@sdeiss `_
* Ben Evans (`@bdevans `_)
* Tapasweni Pathak (`@tapaswenipathak `_)
* `@jonathanoesterle `_
* Richard C Gerkin (`@rgerkin `_)
* Christian Behrens (`@chbehrens `_)
* Romain Brette (`@romainbrette `_)
* XiaoquinNUDT (`@XiaoquinNUDT `_)
* Dylan Muir (`@DylanMuir `_)
* Aleksandra Teska (`@alTeska `_)
* Felix Z. Hoffmann (`@felix11h `__)
* `@baixiaotian63648995 `_
* Carlos de la Torre (`@c-torre `_)
* Sam Mathias (`@sammosummo `_)
* `@Marghepano `_
* Simon Brodeur (`@sbrodeur `_)
* Alex Dimitrov (`@adimitr `_)
Other contributions outside of github (ordered alphabetically, apologies to
anyone we forgot...):
* Ronaldo Nunes
* Tom Achache
Brian 2.2.2.1
-------------
This is a bug-fix release that fixes several bugs and adds a few minor new
features. We recommend all users of Brian 2 to upgrade.
As always, please report bugs or suggestions to the github bug tracker
(https://github.com/brian-team/brian2/issues) or to the brian-development
mailing list (brian-development@googlegroups.com).
[Note that the original upload of this release was version 2.2.2, but due to
a mistake in the released archive, it has been uploaded again as version 2.2.2.1]
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Fix an issue with the synapses generator syntax (:issue:`1037`).
* Fix an incorrect error when using a `SpikeGeneratorGroup` with a long period
(:issue:`1041`). Thanks to Kévin Cuallado-Keltsch for reporting this issue.
* Improve the performance of `SpikeGeneratorGroup` by avoiding a conversion
from time to integer time step (:issue:`1043`). This time step is now also
available to user code as ``t_in_timesteps``.
* Function definitions for weave/Cython/C++ standalone can now declare
additional header files and libraries. They also support a new ``sources``
argument to use a function definition from an external file. See the
:doc:`../advanced/functions` documentation for details.
* For convenience, single-neuron subgroups can now be created with a single
index instead of with a slice (e.g. ``neurongroup[3]`` instead of
``neurongroup[3:4]``).
* Fix an issue when ``-inf`` is used in an equation (:issue:`1061`).
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Dan Goodman (`@thesamovar `_)
* Felix Z. Hoffmann (`@Felix11H `_)
* `@wjx0914 `_
* Kévin Cuallado-Keltsch (`@kevincuallado `_)
* Romain Cazé (`@rcaze `_)
* Daphne (`@daphn3cor `_)
* Erik (`@parenthetical-e `_)
* `@RahulMaram `_
* Eghbal Hosseini (`@eghbalhosseini `_)
* Martino Sorbaro (`@martinosorb `_)
* Mihir Vaidya (`@MihirVaidya94 `_)
* `@hellolingling `_
* Volodimir Slobodyanyuk (`@vslobody `_)
* Peter Duggins (`@psipeter `_)
Brian 2.2.1
-----------
This is a bug-fix release that fixes a few minor bugs and incompatibilites with
recent versions of the dependencies. We recommend all users of Brian 2 to
upgrade.
As always, please report bugs or suggestions to the github bug tracker
(https://github.com/brian-team/brian2/issues) or to the brian-development
mailing list (brian-development@googlegroups.com).
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Work around problems with the latest version of ``py-cpuinfo`` on Windows
(:issue:`990`, :issue:`1020`) and no longer require it for Linux and OS X.
* Avoid warnings with newer versions of Cython (:issue:`1030`) and correctly
build the Cython spike queue for Python 3.7 (:issue:`1026`), thanks to Fleur
Zeldenrust and Ankur Sinha for reporting these issues.
* Fix error messages for ``SyntaxError`` exceptions in jupyter notebooks
(:issue:`#964`).
Dependency and packaging changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Conda packages in `conda-forge `_ are now avaible
for Python 3.7 (but no longer for Python 3.5).
* Linux and OS X no longer depend on the ``py-cpuinfo`` package.
* Source packages on `pypi `_ now require a recent Cython
version for installation.
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Dan Goodman (`@thesamovar `_)
* Christopher (`@Chris-Currin `_)
* Peter Duggins (`@psipeter `_)
* Paola Suárez (`@psrmx `_)
* Ankur Sinha (`@sanjayankur31 `_)
* `@JingjinW `_
* Denis Alevi (`@denisalevi `_)
* `@lemonade117 `_
* `@wjx0914 `_
* Sven Leach (`@SvennoNito `_)
* svadams (`@svadams `_)
* `@ghaessig `_
* Varshith Sreeramdass (`@varshiths `_)
Brian 2.2
---------
This releases fixes a number of important bugs and comes with a number of
performance improvements. It also makes sure that simulation no longer give
platform-dependent results for certain corner cases that involve the division of
integers. These changes can break backwards-compatiblity in certain cases, see
below. We recommend all users of Brian 2 to upgrade.
As always, please report bugs or suggestions to the github bug tracker
(https://github.com/brian-team/brian2/issues) or to the brian-development
mailing list (brian-development@googlegroups.com).
Selected improvements and bug fixes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Divisions involving integers now use floating point division, independent of
Python version and code generation target. The ``//`` operator can now used in
equations and expressions to denote flooring division (:issue:`984`).
* Simulations can now use single precision instead of double precision floats in
simulations (:issue:`981`, :issue:`1004`). This is mostly intended for use
with GPU code generation targets.
* The `~brian2.core.functions.timestep`, introduced in version 2.1.3, was
further optimized for performance, making the refractoriness calculation
faster (:issue:`996`).
* The ``lastupdate`` variable is only automatically added to synaptic models
when event-driven equations are used, reducing the memory and performance
footprint of simple synaptic models (:issue:`1003`). Thanks to Denis Alevi
for bringing this up.
* A ``from brian2 import *`` imported names unrelated to Brian, and overwrote
some Python builtins such as ``dir`` (:issue:`969`). Now, fewer names are
imported (but note that this still includes numpy and plotting tools:
:doc:`../user/import`).
* The ``exponential_euler`` state updater is no longer failing for systems of
equations with differential equations that have trivial, constant
right-hand-sides (:issue:`1010`). Thanks to Peter Duggins for making us aware
of this issue.
Backward-incompatible changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Code that divided integers (e.g. ``N/10``) with a C-based code generation
target, or with the ``numpy`` target on Python 2, will now use floating point
division instead of flooring division (i.e., Python 3 semantics). A warning
will notify the user of this change, use either the flooring division operator
(``N//10``), or the ``int`` function (``int(N/10)``) to make the expression
unambiguous.
* Code that directly referred to the ``lastupdate`` variable in synaptic
statements, without using any event-driven variables, now has to manually add
``lastupdate : second`` to the equations and update the variable at the end
of ``on_pre`` and/or ``on_post`` with ``lastupdate = t``.
* Code that relied on ``from brian2 import *`` also importing unrelated names
such as ``sympy``, now has to import such names explicitly.
Documentation improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~
* Various small fixes and additions (e.g. installation instructions, available
functions, fixes in examples)
* A new example, :doc:`Izhikevich 2007 <../examples/frompapers.Izhikevich_2007>`,
provided by `Guillaume Dumas `_.
Contributions
~~~~~~~~~~~~~
Github code, documentation, and issue contributions (ordered by the number of
contributions):
* Marcel Stimberg (`@mstimberg `_)
* Dan Goodman (`@thesamovar `_)
* Denis Alevi (`@denisalevi `_)
* Thomas Nowotny (`@tnowotny `_)
* `@neworderofjamie `_
* Paul Brodersen (`@paulbrodersen `_)
* `@matrec4