
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
nengo
Advanced tools
.. image:: https://img.shields.io/pypi/v/nengo.svg :target: https://pypi.org/project/nengo :alt: Latest PyPI version
.. image:: https://img.shields.io/pypi/pyversions/nengo.svg :target: https://pypi.org/project/nengo :alt: Python versions
Nengo: Large-scale brain modelling in Python
.. image:: https://www.nengo.ai/design/_images/general-nef-summary.svg :width: 100% :target: https://doi.org/10.3389/fninf.2013.00048 :alt: An illustration of the three principles of the NEF
Nengo is a Python library for building and simulating large-scale neural models. Nengo can create sophisticated spiking and non-spiking neural simulations with sensible defaults in a few lines of code. Yet, Nengo is highly extensible and flexible. You can define your own neuron types and learning rules, get input directly from hardware, build and run deep neural networks, drive robots, and even simulate your model on a completely different neural simulator or neuromorphic hardware.
Nengo depends on NumPy, and we recommend that you
install NumPy before installing Nengo.
If you're not sure how to do this, we recommend using
Anaconda <https://www.anaconda.com/products/individual>_.
To install Nengo::
pip install nengo
If you have difficulty installing Nengo or NumPy,
please read the more detailed
Nengo installation instructions <https://www.nengo.ai/nengo/getting_started.html#installation>_ first.
If you'd like to install Nengo from source,
please read the developer installation instructions <https://www.nengo.ai/nengo/contributing.html#developer-installation>_.
Nengo is tested to work on Python 3.6 and above. Python 2.7 and Python 3.4 were supported up to and including Nengo 2.8.0. Python 3.5 was supported up to and including Nengo 3.1.
Here are six of
many examples <https://www.nengo.ai/nengo/examples.html>_
showing how Nengo enables the creation and simulation of
large-scale neural models in few lines of code.
100 LIF neurons representing a sine wave <https://www.nengo.ai/nengo/examples/basic/many_neurons.html>_Computing the square across a neural connection <https://www.nengo.ai/nengo/examples/basic/squaring.html>_Controlled oscillatory dynamics with a recurrent connection <https://www.nengo.ai/nengo/examples/dynamics/controlled_oscillator.html>_Learning a communication channel with the PES rule <https://www.nengo.ai/nengo/examples/learning/learn_communication_channel.html>_Simple question answering with the Semantic Pointer Architecture <https://www.nengo.ai/nengo-spa/examples/question.html>_A summary of the principles underlying all of these examples <https://www.nengo.ai/nengo/examples/advanced/nef_summary.html>_Usage and API documentation can be found at
<https://www.nengo.ai/nengo/>_.
To build the documentation yourself, see the Developer Guide <https://www.nengo.ai/nengo/contributing.html#how-to-build-the-documentation>_.
Information for current or prospective developers can be found
at <https://www.nengo.ai/contributing/>_.
Questions relating to Nengo, whether it's use or it's development, should be
asked on the Nengo forum at <https://forum.nengo.ai>_.
Release history
.. Changelog entries should follow this format:
section
.. Changes should be organized in one of several sections:
Fixed
Added
groups parameter to nengo.Convolution. (#1675, #1684)Changed
#1693_)Fixed
nengo.LinearFilter and subclasses (e.g. Lowpass,
Alpha) would fail when running on tensors with dimension >= 3. (#1687_).. _#1675: https://github.com/nengo/nengo/issues/1675 .. _#1684: https://github.com/nengo/nengo/pull/1684 .. _#1687: https://github.com/nengo/nengo/pull/1687 .. _#1693: https://github.com/nengo/nengo/pull/1693
Added
#1660_)ChannelShape.from_space_and_channels to easily construct a
ChannelShape from a spatial shape and number of channels. (#1648_)ConvolutionTranspose transform to perform transposed convolution.
It is commonly used for various forms of upsampling in deep networks. (#1648_)Conv and ConvTranspose aliases for Convolution and
ConvolutionTranspose. (#1648_)Changed
NEP-29, #1683)Removed
#1649_)nengo.utils.graphs.graph (this was a small utility function for building
graphs that was only used in tests). (#1654_)simulator.ProbeDict alias; this was previously renamed to
simulator.SimulationData. (#1649_)Fixed
#1649_)#1654_)#1676_)Node output functions would receive
a copy of the input signal, while Process step functions would not.
Process step functions now also receive copies. (#1679_)Neurons.probeable have been removed. (#1681_).. _#1648: https://github.com/nengo/nengo/pull/1648 .. _#1649: https://github.com/nengo/nengo/pull/1649 .. _#1654: https://github.com/nengo/nengo/pull/1654 .. _#1660: https://github.com/nengo/nengo/pull/1660 .. _#1676: https://github.com/nengo/nengo/pull/1676 .. _#1679: https://github.com/nengo/nengo/pull/1679 .. _#1681: https://github.com/nengo/nengo/pull/1681 .. _#1683: https://github.com/nengo/nengo/pull/1683 .. _NEP-29: https://numpy.org/neps/nep-0029-deprecation_policy.html
Added
#1589 <https://github.com/nengo/nengo/pull/1589>__)step_order attribute to nengo.Simulator, which contains an
ordered list of the operations run on each timestep.
(#1615 <https://github.com/nengo/nengo/pull/1615>__)make_state method to NeuronType, which initializes the
neuron type's state variables. (#1609_)spiking attribute to NeuronType, which exposes whether
a neuron type is spiking or non-spiking. (#1609_)negative attribute to NeuronType, which indicates whether
the neuron type can have negative outputs. (#1609_)Tanh neuron type to simulate hyperbolic tangent neurons. (#1609_)RatesToSpikesNeuronType, which is a base class for neuron types
that convert a rate-based type to a spiking one. (#1609_)RegularSpiking neuron type, which emits regularly-spaced spikes
at the rate specified by its base type. (#1609_)StochasticSpiking neuron type, which emits spikes based on stochastic
rounding to roughly match the rate specified by its base type. (#1609_)PoissonSpiking neuron type, which emits Poisson-distributed spikes,
as are commonly used to match biological spiking statistics. (#1609_)PositiveNeuronType test argument to run tests on all neuron types
for which negative is not True. (#1609_)QuasirandomSequence distribution, which is similar to
Uniform but spreads points across the space evenly. (#1611_)ScatteredHypersphere distribution, which is similar to
UniformHypersphere but spreads points across the space more evenly. (#1611_)RLS (recursive least-squares) learning rule, which is an online
version of the least-squares method typically used for offline decoder-solving.
(#1611_, example <learn-product_>__)SimProbe operator, which marks a signal as being probed. (#1653_)Changed
#1628_)None, meaning that there will be
no transform applied. This only changes behavior when learning on a
neuron-neuron connection with the default scalar transform. In that situation
there are now no weights to apply learning to, so this will result in an
error. The old behaviour can be obtained by setting transform=1.
(#1591 <https://github.com/nengo/nengo/pull/1591>__).ensembles, .connections, .probes) are now
read-only, to prevent users from accidentally overwriting them with their own data.
(#1545 <https://github.com/nengo/nengo/issues/1545>,
#1608 <https://github.com/nengo/nengo/pull/1608>)NeuronType.step_math method has been renamed to NeuronType.step.
(#1609_)state class attribute declares the neuron type's
state variables and their default initial values. All __init__ methods accept
an initial_state dictionary for users to override the default initial state
values. (#1609_)nl and nl_nodirect test arguments have been renamed to AnyNeuronType
and NonDirectNeuronType. (#1609_)weights=True) are now allowed on all connections.
For connections that are not between Ensembles, though, weight solvers have the
same effects as solvers with weights=False, and a warning will be raised.
(#1626 <https://github.com/nengo/nengo/pull/1626>__)#1629_)EnsembleArray now raises an error if add_output would
overwrite an existing attribute. (#1611_)encoders and eval_points of Ensemble are now sampled from
ScatteredHypersphere by default. (#1611_)#1599_)Deprecated
NeuronType.step replaces the NeuronType.step_math method,
which will be removed in Nengo 4.0.0. (#1609_)Connection.is_decoded is deprecated, as the definition of whether a Connection
is decoded or not was ambiguous. Instead we recommend directly checking the pre/post
objects for the properties of interest. (#1640_)Fixed
Ensemble.neurons or
Connection.learning_rule objects.
(#1588 <https://github.com/nengo/nengo/pull/1588>__)Ensemble.
(#1598 <https://github.com/nengo/nengo/pull/1598>__)Simulator would rerun the optimizer.
(#1598 <https://github.com/nengo/nengo/pull/1598>__)LstsqDrop solver errored when solving for zero weights.
(#1541 <https://github.com/nengo/nengo/issues/1541>,
#1607 <https://github.com/nengo/nengo/pull/1607>)Choice distributions. (#1630_)Signal did not register as sharing memory with itself.
(#1627_)#1640_)#1640_)#1640_)#1640_).. _#1599: https://github.com/nengo/nengo/pull/1599 .. _#1609: https://github.com/nengo/nengo/pull/1609 .. _#1611: https://github.com/nengo/nengo/pull/1611 .. _#1627: https://github.com/nengo/nengo/pull/1627 .. _#1628: https://github.com/nengo/nengo/pull/1628 .. _#1629: https://github.com/nengo/nengo/pull/1629 .. _#1630: https://github.com/nengo/nengo/pull/1630 .. _#1640: https://github.com/nengo/nengo/pull/1640 .. _#1653: https://github.com/nengo/nengo/pull/1653 .. _learn-product: https://www.nengo.ai/nengo/examples/learning/learn-product.html
Added
#1428 <https://github.com/nengo/nengo/pull/1428>,
#1087 <https://github.com/nengo/nengo/issues/1087>)#1428 <https://github.com/nengo/nengo/pull/1428>,
#1426 <https://github.com/nengo/nengo/issues/1426>)#1481 <https://github.com/nengo/nengo/pull/1481>__)#1488 <https://github.com/nengo/nengo/pull/1488>__)#1532 <https://github.com/nengo/nengo/pull/1532>__)fail_fast setting to test operators when they are first
added to the model. See configuration options <https://www.nengo.ai/nengo/nengorc.html#configuration-options>__
for details. (#1532 <https://github.com/nengo/nengo/pull/1532>__)--memory option for pytest that prints the total memory
consumed by the tests when they complete (Linux and Mac OS X only).
(#640 <https://github.com/nengo/nengo/pull/640>__)#640 <https://github.com/nengo/nengo/pull/640>__)Simulator.clear_probes method to clear probe data.
This method can be used before pickling to reduce the pickle file size.
(#1387 <https://github.com/nengo/nengo/pull/1387>__)allclose fixture from pytest-allclose,
which makes it possible for backends to change test tolerances.
(#1563 <https://github.com/nengo/nengo/pull/1563>__)rng and seed fixtures from pytest-rng.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)plt fixture from pytest-plt.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)nengo_simloader pytest option for specifying a callable that
takes a pytest request and returns a callable to be used
as Simulator in the Nengo test suite.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)#1578 <https://github.com/nengo/nengo/pull/1578>__)Changed
#1520 <https://github.com/nengo/nengo/pull/1520>,
python3statement.org <https://python3statement.org/>)PEP-429 <https://www.python.org/dev/peps/pep-0429/>,
#1514 <https://github.com/nengo/nengo/pull/1514>)dt argument to Simulator.trange with sample_every
because dt would return values that the simulator had not simulated.
dt is now an alias for sample_every and will be removed in the future.
(#1368 <https://github.com/nengo/nengo/issues/1368>,
#1384 <https://github.com/nengo/nengo/pull/1384>)Connection.transform) will now be represented internally as
nengo.Dense objects. Arrays/scalars can still be passed as transform
values, and they will be automatically converted to the equivalent
nengo.Dense object. Retrieving the value of my_conn.transform will
return that Dense object. The original input array can be retrieved
through my_conn.transform.init.
(#1481 <https://github.com/nengo/nengo/pull/1481>__)nengo.solvers.NoSolver(w, weights=True) now expects w to have shape
(pre.n_neurons, function_d),
rather than pre.n_neurons, post.n_neurons). That is, with NoSolver
you are always specifying the values for the decoders, and encoders/transform
will be applied automatically to those decoders (as occurs with
all other solvers). Note that this does not affect
NoSolver(..., weights=False) (the default).
(#1481 <https://github.com/nengo/nengo/pull/1481>__)instructions for installing NumPy <https://www.nengo.ai/nengo/getting-started.html#installing-numpy>__
if you need to upgrade.
(#1481 <https://github.com/nengo/nengo/pull/1481>__)#1507 <https://github.com/nengo/nengo/pull/1507>__)#1507 <https://github.com/nengo/nengo/pull/1507>__)#1440 <https://github.com/nengo/nengo/pull/1440>_)nengo-sphinx-theme <https://github.com/nengo/nengo-sphinx-theme>_.
(#1489 <https://github.com/nengo/nengo/pull/1489>__)settled_firingrate function has been moved from
nengo.utils.neurons to nengo.neurons.
(#1187 <https://github.com/nengo/nengo/pull/1187>_)nengo_test_unsupported (replacing the
previous Simulator.unsupported functionality).
(#1521 <https://github.com/nengo/nengo/pull/1521>_)#1514 <https://github.com/nengo/nengo/pull/1514>_)NeuronType.current and NeuronType.rates methods now document
the supported shapes of parameters and return values.
(#1437 <https://github.com/nengo/nengo/pull/1437>__)#1398 <https://github.com/nengo/nengo/pull/1398>_)NdarrayParam now accepts a dtype argument to check that
data assigned to that parameter matches the given Numpy dtype.
DistOrArrayParam accepts an analogous sample_dtype argument.
(#1532 <https://github.com/nengo/nengo/pull/1532>__)fail_fast RC setting.
(#1532 <https://github.com/nengo/nengo/pull/1532>__)LinearFilter now uses state space representations internally,
which is faster and potentially more accurate.
(#1535 <https://github.com/nengo/nengo/pull/1535>__)y0 in Synapse.filt is now 0 instead of
the initial value of the input signal. This allows unstable filters
(e.g., integrators) to be used with filt.
(#1535 <https://github.com/nengo/nengo/pull/1535>__)LinearFilter now accepts the discretization method as an argument,
rather than having it specified in make_step.
(#1535 <https://github.com/nengo/nengo/pull/1535>__)synapse_kwargs argument to FilteredNoise has been removed.
(#1535 <https://github.com/nengo/nengo/pull/1535>__)make_state method and accepting a state parameter in make_step.
(#1387 <https://github.com/nengo/nengo/pull/1387>__)Simulator is now pickleable, allowing its state to be saved and loaded.
(#1387 <https://github.com/nengo/nengo/pull/1387>__)utils.testing.allclose to utils.testing.signals_allclose,
to differentiate it from the allclose fixture.
(#1563 <https://github.com/nengo/nengo/pull/1563>__)intercepts value has been changed to Uniform(-1, 0.9)
to avoid high gains when intercepts are close to 1.
(#1534 <https://github.com/nengo/nengo/issues/1534>,
#1561 <https://github.com/nengo/nengo/pull/1561>)--simulator and --neurons pytest command line arguments are now specified
by nengo_simulator and nengo_neurons entries in the pytest config file
instead.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)nengo_test_unsupported option now uses pytest nodeids for the test names
(the main change is that this means a double :: between file and function names).
(#1566 <https://github.com/nengo/nengo/pull/1566>__)Signals will now raise an error if their initial value contains NaNs.
(#1571 <https://github.com/nengo/nengo/pull/1571>__)#1571 <https://github.com/nengo/nengo/pull/1571>__)simulator.ProbeDict to simulator.SimulationData.
(#1574 <https://github.com/nengo/nengo/pull/1574>__)#1577 <https://github.com/nengo/nengo/pull/1577>__)#1585 <https://github.com/nengo/nengo/pull/1585>__)Deprecated
nengo.spa module. Use the
Nengo SPA <https://www.nengo.ai/nengo-spa/index.html>__
project instead.
(#1465 <https://github.com/nengo/nengo/pull/1465>_)A and B inputs to the Product and CircularConvolution
networks are officially deprecated. Use input_a and input_b instead.
(#887 <https://github.com/nengo/nengo/issues/887>,
#1179 <https://github.com/nengo/nengo/pull/1179>)nengo.utils.compat will be removed in the next minor release.
(#1520 <https://github.com/nengo/nengo/pull/1520>_)utils.numpy.rmse. Call utils.numpy.rms on
the difference between two arrays instead.
(#1563 <https://github.com/nengo/nengo/pull/1563>__)Removed
net argument. To set network arguments
like label, pass them as keyword arguments instead.
(#1179 <https://github.com/nengo/nengo/pull/1179>__)generate_graphviz utility function. It can now be found in
nengo_extras <https://github.com/nengo/nengo-extras>__.
(#1187 <https://github.com/nengo/nengo/pull/1187>_)nengo_extras <https://github.com/nengo/nengo-extras>__.
(#1187 <https://github.com/nengo/nengo/pull/1187>_)probe_all function. It can now be found in
nengo_extras <https://github.com/nengo/nengo-extras>__.
(#1187 <https://github.com/nengo/nengo/pull/1187>_)PES.correction is no longer probeable.
(#1398 <https://github.com/nengo/nengo/pull/1398>_)rng and seed fixtures have been removed. Use the
external pytest-rng <https://www.nengo.ai/pytest-rng/>__ package instead.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)plt fixture has been removed. Use the
external pytest-plt <https://www.nengo.ai/pytest-plt/>__ package instead.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)logger fixture has been removed. Use pytest's
log capturing <https://docs.pytest.org/en/stable/how-to/logging.html>__
instead. (#1566 <https://github.com/nengo/nengo/pull/1566>__)nengo.log and nengo.utils.logging. Use the standard Python
and pytest logging modules instead.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)analytics and analytics_data fixtures have been removed.
Use pytest's
cache fixture <https://docs.pytest.org/en/stable/how-to/cache.html>__
instead. (#1566 <https://github.com/nengo/nengo/pull/1566>__)RefSimulator fixture has been removed. Use the Simulator fixture
and the nengo_test_unsupported configuration option instead.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)find_modules and load_functions from nengo.utils.testing.
Backends wanting to run Nengo test should use pytest --pyargs nengo
instead.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)nengo.tests.options. It is no longer necessary to use
-p nengo.tests.options when running Nengo tests.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)nengo.conftest. Use pytest configuration options instead.
(#1566 <https://github.com/nengo/nengo/pull/1566>__)#1577 <https://github.com/nengo/nengo/pull/1577>__)#1577 <https://github.com/nengo/nengo/pull/1577>__)*_tau (e.g. pre_tau) parameters from learning rules.
Use *_synapse instead.
(#1577 <https://github.com/nengo/nengo/pull/1577>__)neuron_nodes argument from networks.EnsembleArray.
Use EnsembleArray.add_neuron_input/add_neuron_output instead.
(#1577 <https://github.com/nengo/nengo/pull/1577>__)progress.updater config option.
Use progress.progress_bar instead.
(#1577 <https://github.com/nengo/nengo/pull/1577>__)nengo.synapses.filt/filtfilt functions.
Use the Synapse.filt/filtfilt methods instead.
(#1577 <https://github.com/nengo/nengo/pull/1577>__)utils.compat.
(#1577 <https://github.com/nengo/nengo/pull/1577>__)utils.connection.target_function. Target points can be passed
directly to the Connection.function argument instead.
(#1577 <https://github.com/nengo/nengo/pull/1577>__)utils.functions.piecewise. Use nengo.processes.Piecewise instead.
(#1577 <https://github.com/nengo/nengo/pull/1577>__)utils.testing.Mock.
(#1578 <https://github.com/nengo/nengo/pull/1578>__)Fixed
FrozenObjects can control parameter initialization order when copying,
which fixed a bug encountered when copying convolutional connections.
(#1493 <https://github.com/nengo/nengo/pull/1493>__)#1474 <https://github.com/nengo/nengo/pull/1474>__)size_in/size_out.
(#1452 <https://github.com/nengo/nengo/issues/1452>,
#1434 <https://github.com/nengo/nengo/pull/1434>)#1472 <https://github.com/nengo/nengo/pull/1472>__)#1499 <https://github.com/nengo/nengo/issues/1499>,
#1500 <https://github.com/nengo/nengo/pull/1500>)LinearFilter synapses had unnecessary delays
that have now been removed.
(#1535 <https://github.com/nengo/nengo/pull/1535>__)SpikingRectifiedLinear neuron type now have their
decoders cached. (#1550 <https://github.com/nengo/nengo/pull/1550>__)ShapeParam/TupleParam can now be set to None.
(#1569 <https://github.com/nengo/nengo/pull/1569>__)Ensemble.neurons
object.
(#1582 <https://github.com/nengo/nengo/issues/1582>,
#1583 <https://github.com/nengo/nengo/pull/1583>)Added
gain and bias along with either of
max_rates or intercepts, as the latter two parameters are ignored.
(#1431 <https://github.com/nengo/nengo/issues/1431>,
#1433 <https://github.com/nengo/nengo/pull/1433>)Changed
#1365 <https://github.com/nengo/nengo/issues/1365>,
#1385 <https://github.com/nengo/nengo/pull/1385>)learning_rate always comes first.
(#1095 <https://github.com/nengo/nengo/pull/1095>__)pre_synapse, post_synapse, and theta_synapse
instead of pre_tau, post_tau, and theta_tau respectively.
This allows arbitrary Synapse objects to be used as filters on
learning signals.
(#1095 <https://github.com/nengo/nengo/pull/1095>__)Deprecated
nengo.ipynb IPython extension and the IPython2ProgressBar
have been deprecated and replaced by the IPython5ProgressBar.
This progress bar will be automatically activated in IPython and
Jupyter notebooks from IPython version 5.0 onwards.
(#1087 <https://github.com/nengo/nengo/issues/1087>,
#1375 <https://github.com/nengo/nengo/pull/1375>)pre_tau, post_tau, and theta_tau parameters
for learning rules are deprecated. Instead, use pre_synapse,
post_synapse, and theta_synapse respectively.
(#1095 <https://github.com/nengo/nengo/pull/1095>__)Removed
nengo.utils.docutils in favor of using
nbsphinx <https://nbsphinx.readthedocs.io>.
(#1349 <https://github.com/nengo/nengo/pull/1349>)Added
amplitude parameter to LIF, LIFRate,
and RectifiedLinear which scale the output amplitude.
(#1325 <https://github.com/nengo/nengo/pull/1325>_,
#1391 <https://github.com/nengo/nengo/pull/1391>__)SpikingRectifiedLinear neuron model.
(#1391 <https://github.com/nengo/nengo/pull/1391>__)Changed
Ensemble.n_neurons or Ensemble.dimensions.
(#1372 <https://github.com/nengo/nengo/pull/1372>__)#980 <https://github.com/nengo/nengo/issues/980>,
#1386 <https://github.com/nengo/nengo/pull/1386>)Fixed
Model instances.
(#1135 <https://github.com/nengo/nengo/pull/1135>_)nengo.Node functions.
(#1317 <https://github.com/nengo/nengo/pull/1317>_)(*args, **kwargs)
could not be used in custom solvers.
(#1358 <https://github.com/nengo/nengo/issues/1358>,
#1359 <https://github.com/nengo/nengo/pull/1359>)#1364 <https://github.com/nengo/nengo/pull/1364>_)#1372 <https://github.com/nengo/nengo/pull/1372>__)#1395 <https://github.com/nengo/nengo/pull/1395>_)Simulator.n_steps and Simulator.time properties
now return scalars, as was stated in the documentation.
(#1406 <https://github.com/nengo/nengo/pull/1406>_)--seed-offset option of the test suite.
(#1409 <https://github.com/nengo/nengo/pull/1409>_)Added
NoSolver solver that can be used to manually pass in
a predefined set of decoders or weights to a connection.
(#1352 <https://github.com/nengo/nengo/pull/1352>_)Piecewise process, which replaces the now deprecated
piecewise function.
(#1036 <https://github.com/nengo/nengo/issues/1036>,
#1100 <https://github.com/nengo/nengo/pull/1100>,
#1355 <https://github.com/nengo/nengo/pull/1355/>,
#1362 <https://github.com/nengo/nengo/pull/1362>)Changed
#947 <https://github.com/nengo/nengo/issues/947>_)#1356 <https://github.com/nengo/nengo/pull/1356>_)#1354 <https://github.com/nengo/nengo/issues/1354>,
#1357 <https://github.com/nengo/nengo/pull/1357>)Fixed
ObjView when using a weight solver.
(#1317 <https://github.com/nengo/nengo/pull/1317>_)#1340 <https://github.com/nengo/nengo/pull/1340>_)ShapeParam would always store None.
(#1342 <https://github.com/nengo/nengo/pull/1342>_)#947 <https://github.com/nengo/nengo/issues/947>,
#1361 <https://github.com/nengo/nengo/pull/1361>)Deprecated
piecewise function in nengo.utils.functions has been deprecated.
Please use the Piecewise process instead.
(#1100 <https://github.com/nengo/nengo/pull/1100>_)Added
n_neurons property to Network, which gives the
number of neurons in the network, including all subnetworks.
(#435 <https://github.com/nengo/nengo/issues/435>,
#1186 <https://github.com/nengo/nengo/pull/1186>)#1129 <https://github.com/nengo/nengo/pull/1129>_)UniformHypersphere.
(#799 <https://github.com/nengo/nengo/pull/799>_)#1130 <https://github.com/nengo/nengo/pull/1130>_)#1119 <https://github.com/nengo/nengo/issues/1119>,
#1130 <https://github.com/nengo/nengo/pull/1130>)LinearFilter.combine method to
combine two LinearFilter instances.
(#1312 <https://github.com/nengo/nengo/pull/1312>_)max_rates and intercepts given gain and bias.
(#1334 <https://github.com/nengo/nengo/pull/1334>_)Changed
size_in parameter and attribute,
allowing both integers and strings to define the dimensionality
of the learning rule. This replaces the error_type attribute.
(#1307 <https://github.com/nengo/nengo/pull/1307>,
#1310 <https://github.com/nengo/nengo/pull/1310>)EnsembleArray.n_neurons now gives the total number of neurons
in all ensembles, including those in subnetworks.
To get the number of neurons in each ensemble,
use EnsembleArray.n_neurons_per_ensemble.
(#1186 <https://github.com/nengo/nengo/pull/1186>_)Nengo modelling API document <https://www.nengo.ai/nengo/frontend-api.html>_
now has summaries to help navigate the page.
(#1304 <https://github.com/nengo/nengo/pull/1304>_)Connection function returns None
is now more clear.
(#1319 <https://github.com/nengo/nengo/pull/1319>_)Connection transform is set to None.
(#1326 <https://github.com/nengo/nengo/pull/1326>_)Fixed
#1324 <https://github.com/nengo/nengo/pull/1324>_)#1330 <https://github.com/nengo/nengo/pull/1330>_)#1335 <https://github.com/nengo/nengo/issues/1335>,
#1336 <https://github.com/nengo/nengo/pull/1336>)Added
optimize=False to Simulator.
(#1035 <https://github.com/nengo/nengo/pull/1035>_)Ensemble.normalize_encoders to False.
(#1191 <https://github.com/nengo/nengo/issues/1191>,
#1267 <https://github.com/nengo/nengo/pull/1267>)Samples distribution to allow raw NumPy arrays
to be passed in situations where a distribution is required.
(#1233 <https://github.com/nengo/nengo/pull/1233>_)Changed
#1212 <https://github.com/nengo/nengo/issues/1212>,
#1231 <https://github.com/nengo/nengo/issues/1231>,
#1248 <https://github.com/nengo/nengo/pull/1248>_)Node or Direct ensemble
produces a non-finite value.
(#1178 <https://github.com/nengo/nengo/issues/1178>,
#1280 <https://github.com/nengo/nengo/issues/1280>,
#1286 <https://github.com/nengo/nengo/pull/1286>_)label of a network must be a string or None,
and that the seed of a network must be an int or None.
This helps avoid situations where the seed would mistakenly
be passed as the label.
(#1277 <https://github.com/nengo/nengo/pull/1277>,
#1275 <https://github.com/nengo/nengo/issues/1275>)ens_kwargs argument of
EnsembleArray. Arrays are wrapped in a Samples distribution internally.
(#691 <https://github.com/nengo/nengo/issues/691>,
#766 <https://github.com/nengo/nengo/issues/766>,
#1233 <https://github.com/nengo/nengo/pull/1233>_)tau_ref) for the Sigmoid neuron type
has changed to 2.5 ms (from 2 ms) for better compatibility with the
default maximum firing rates of 200-400 Hz.
(#1248 <https://github.com/nengo/nengo/pull/1248>_)Product and CircularConvolution networks have been
renamed from A and B to input_a and input_b for consistency.
The old names are still available, but should be considered deprecated.
(#887 <https://github.com/nengo/nengo/issues/887>,
#1296 <https://github.com/nengo/nengo/pull/1296>)Fixed
#1184 <https://github.com/nengo/nengo/issues/1184>,
#1185 <https://github.com/nengo/nengo/pull/1185>)Deprecated
net argument to networks has been deprecated. This argument existed
so that network components could be added to an existing network instead of
constructing a new network. However, this feature is rarely used,
and makes the code more complicated for complex networks.
(#1296 <https://github.com/nengo/nengo/pull/1296>_)Added
#1224 <https://github.com/nengo/nengo/pull/1224>_)nengo.utils.network.activate_direct_mode function to make it
easier to activate direct mode in networks where some parts require neurons.
(#1111 <https://github.com/nengo/nengo/issues/1111>,
#1168 <https://github.com/nengo/nengo/pull/1168>)Fixed
#1159 <https://github.com/nengo/nengo/pull/1159>_)#1245 <https://github.com/nengo/nengo/pull/1245>_)#1234 <https://github.com/nengo/nengo/issues/1234>,
#1245 <https://github.com/nengo/nengo/pull/1245>)#1266 <https://github.com/nengo/nengo/issues/1266>,
#1271 <https://github.com/nengo/nengo/pull/1271>)#1200 <https://github.com/nengo/nengo/issues/1200>,
#1235 <https://github.com/nengo/nengo/pull/1235>)Changed
IndexError
now to be consistent with standard Python behaviour.
(#1176 <https://github.com/nengo/nengo/issues/1176>,
#1183 <https://github.com/nengo/nengo/pull/1183>)#1251 <https://github.com/nengo/nengo/pull/1251>_)Added
scaled_encoders on ensembles.
(#1167 <https://github.com/nengo/nengo/pull/1167>,
#1117 <https://github.com/nengo/nengo/issues/1117>)copy method to Nengo objects. Nengo objects can now be pickled.
(#977 <https://github.com/nengo/nengo/issues/977>,
#984 <https://github.com/nengo/nengo/pull/984>)#937 <https://github.com/nengo/nengo/issues/937>,
#1151 <https://github.com/nengo/nengo/pull/1151>)nengo.dists.get_samples function for convenience
when working with distributions or samples.
(#1181 <https://github.com/nengo/nengo/pull/1181>,
docs <https://www.nengo.ai/nengo/frontend-api.html#nengo.dists.get_samples>)Changed
nengo.Simulator.data is now cached,
making repeated access much faster.
(#1076 <https://github.com/nengo/nengo/issues/1076>,
#1175 <https://github.com/nengo/nengo/pull/1175>)Deprecated
nengo.Simulator.model is deprecated. To access static data
generated during the build use nengo.Simulator.data. It provides access
to everything that nengo.Simulator.model.params used to provide access to
and is the canonical way to access this data across different backends.
(#1145 <https://github.com/nengo/nengo/issues/1145>,
#1173 <https://github.com/nengo/nengo/pull/1173>)API changes
function argument
of nengo.Connection. The values in the array are taken to be the
targets in the decoder solving process, which means that the eval_points
must also be set on the connection.
(#1010 <https://github.com/nengo/nengo/pull/1010>_)nengo.utils.connection.target_function is now deprecated, and will
be removed in Nengo 3.0. Instead, pass the targets directly to the
connection through the function argument.
(#1010 <https://github.com/nengo/nengo/pull/1010>_)Behavioural changes
#1147 <https://github.com/nengo/nengo/pull/1147>_)Improvements
nengo.backends entry point to make the reference simulator
discoverable for other Python packages. In the future all backends should
declare an entry point accordingly.
(#1127 <https://github.com/nengo/nengo/pull/1127>_)ShapeParam to store array shapes.
(#1045 <https://github.com/nengo/nengo/pull/1045>_)ThresholdingPreset to configure ensembles for thresholding.
(#1058 <https://github.com/nengo/nengo/issues/1058>,
#1077 <https://github.com/nengo/nengo/pull/1077>,
#1148 <https://github.com/nengo/nengo/pull/1148>_)rasterplot so that spikes from different neurons don't overlap.
(#1121 <https://github.com/nengo/nengo/pull/1121>_)Documentation
#1150 <https://github.com/nengo/nengo/pull/1150>_)Bug fixes
#1097 <https://github.com/nengo/nengo/issues/1097>,
#1107 <https://github.com/nengo/nengo/pull/1107>)filt and filtfilt now support lists as input.
(#1123 <https://github.com/nengo/nengo/pull/1123>_)#1054 <https://github.com/nengo/nengo/issues/1054>,
#1068 <https://github.com/nengo/nengo/pull/1068>)#1156 <https://github.com/nengo/nengo/issues/1156>,
#1157 <https://github.com/nengo/nengo/pull/1157>)Bug fixes
#1112 <https://github.com/nengo/nengo/pull/1112>_)Improvements
LIF neuron model to spike at the same rate as the
LIFRate neuron model for constant inputs. The older model has been
moved to nengo_extras <https://github.com/nengo/nengo-extras>_
under the name FastLIF.
(#975 <https://github.com/nengo/nengo/pull/975>_)y0 attribute to WhiteSignal, which adjusts the phase of each
dimension to begin with absolute value closest to y0.
(#1064 <https://github.com/nengo/nengo/pull/1064>_)AssociativeMemory to accept Semantic Pointer expressions as
input_keys and output_keys.
(#982 <https://github.com/nengo/nengo/pull/982>_)Bug fixes
__del__ method for cleanup. This should solve problems with the
cache's file lock not being removed. It might be necessary to
manually remove the index.lock file in the cache directory after
upgrading from an older Nengo version.
(#1053 <https://github.com/nengo/nengo/pull/1053>,
#1041 <https://github.com/nengo/nengo/issues/1041>,
#1048 <https://github.com/nengo/nengo/issues/1048>_)#1110 <https://github.com/nengo/nengo/pull/1110>,
#1097 <https://github.com/nengo/nengo/issues/1097>)Nnls solver now works for weights. The NnlsL2 solver is
improved since we clip values to be non-negative before forming
the Gram system.
(#1027 <https://github.com/nengo/nengo/pull/1027>,
#1019 <https://github.com/nengo/nengo/issues/1019>)#1089 <https://github.com/nengo/nengo/issues/1089>,
#1090 <https://github.com/nengo/nengo/pull/1090>)a=b, b=a in basal ganglia SPA actions.
(#1098 <https://github.com/nengo/nengo/issues/1098>,
#1099 <https://github.com/nengo/nengo/pull/1099>)ipynb extensions.
(#1088 <https://github.com/nengo/nengo/pull/1088>,
#1085 <https://github.com/nengo/nengo/issues/1085>)API changes
Process
has been added. Node objects are now process-aware, meaning that
a process can be used as a node's output. Unlike non-process
callables, processes are properly reset when a simulator is reset.
See the processes.ipynb example notebook, or the API documentation
for more details.
(#590 <https://github.com/nengo/nengo/pull/590>,
#652 <https://github.com/nengo/nengo/pull/652>,
#945 <https://github.com/nengo/nengo/pull/945>,
#955 <https://github.com/nengo/nengo/pull/955>)LIF neuron models now accept an additional argument,
min_voltage. Voltages are clipped such that they do not drop below
this value (previously, this was fixed at 0).
(#666 <https://github.com/nengo/nengo/pull/666>_)PES learning rule no longer accepts a connection as an argument.
Instead, error information is transmitted by making a connection to the
learning rule object (e.g.,
nengo.Connection(error_ensemble, connection.learning_rule).
(#344 <https://github.com/nengo/nengo/issues/344>,
#642 <https://github.com/nengo/nengo/pull/642>)modulatory attribute has been removed from nengo.Connection.
This was only used for learning rules to this point, and has been removed
in favor of connecting directly to the learning rule.
(#642 <https://github.com/nengo/nengo/pull/642>_)nengo.Probe(conn, 'weights'),
and these are always the weights that will change with learning
regardless of the type of connection. Previously, either decoders or
transform may have changed depending on the type of connection;
it is now no longer possible to probe decoders or transform.
(#729 <https://github.com/nengo/nengo/pull/729>_)nengo.networks. The AssociativeMemory SPA module
also has an updated argument list.
(#702 <https://github.com/nengo/nengo/pull/702>_)Product and InputGatedMemory networks no longer accept a
config argument. (#814 <https://github.com/nengo/nengo/pull/814>_)EnsembleArray network's neuron_nodes argument is deprecated.
Instead, call the new add_neuron_input or add_neuron_output methods.
(#868 <https://github.com/nengo/nengo/pull/868>_)nengo.log utility function now takes a string level parameter
to specify any logging level, instead of the old binary debug parameter.
Cache messages are logged at DEBUG instead of INFO level.
(#883 <https://github.com/nengo/nengo/pull/883>_)nengo.networks.assoc_mem.AssociativeMemory and modifying
the defaults of others.
(#797 <https://github.com/nengo/nengo/pull/797>_)close method to Simulator. Simulator can now be used
used as a context manager.
(#857 <https://github.com/nengo/nengo/issues/857>,
#739 <https://github.com/nengo/nengo/issues/739>,
#859 <https://github.com/nengo/nengo/pull/859>_)nengo.exceptions module.
(#781 <https://github.com/nengo/nengo/pull/781>_)Connection, Ensemble, Node, and Probe)
now accept a label and seed argument if they didn't previously.
(#958 <https://github.com/nengo/nengo/pull/859>_)nengo.synapses, filt and filtfilt are deprecated. Every
synapse type now has filt and filtfilt methods that filter
using the synapse.
(#945 <https://github.com/nengo/nengo/pull/945>_)Connection objects can now accept a Distribution for the transform
argument; the transform matrix will be sampled from that distribution
when the model is built.
(#979 <https://github.com/nengo/nengo/pull/979>_).Behavioural changes
PES learning rule's error has been flipped to conform
with most learning rules, in which error is minimized. The error should be
actual - target. (#642 <https://github.com/nengo/nengo/pull/642>_)PES rule's learning rate is invariant to the number of neurons
in the presynaptic population. The effective speed of learning should now
be unaffected by changes in the size of the presynaptic population.
Existing learning networks may need to be updated; to achieve identical
behavior, scale the learning rate by pre.n_neurons / 100.
(#643 <https://github.com/nengo/nengo/issues/643>_)probeable attribute of all Nengo objects is now implemented
as a property, rather than a configurable parameter.
(#671 <https://github.com/nengo/nengo/pull/671>_)x as a copied NumPy array (instead of a readonly
view).
(#716 <https://github.com/nengo/nengo/issues/716>,
#722 <https://github.com/nengo/nengo/pull/722>)#775 <https://github.com/nengo/nengo/issues/775>,
#782 <https://github.com/nengo/nengo/pull/782>)spa.Cortical, and gate ensembles and connections in
spa.Thalamus are now stored in the target modules.
(#894 <https://github.com/nengo/nengo/issues/894>,
#906 <https://github.com/nengo/nengo/pull/906>)filt and filtfilt functions on Synapse now use the initial
value of the input signal to initialize the filter output by default. This
provides more accurate filtering at the beginning of the signal, for signals
that do not start at zero.
(#945 <https://github.com/nengo/nengo/pull/945>_)Improvements
Ensemble.noise attribute, which injects noise directly into
neurons according to a stochastic Process.
(#590 <https://github.com/nengo/nengo/pull/590>_)randomized_svd subsolver for the L2 solvers. This can be much
quicker for large numbers of neurons or evaluation points.
(#803 <https://github.com/nengo/nengo/pull/803>_)PES.pre_tau attribute, which sets the time constant on a lowpass
filter of the presynaptic activity.
(#643 <https://github.com/nengo/nengo/issues/643>_)EnsembleArray.add_output now accepts a list of functions
to be computed by each ensemble.
(#562 <https://github.com/nengo/nengo/issues/562>,
#580 <https://github.com/nengo/nengo/pull/580>)LinearFilter now has an analog argument which can be set
through its constructor. Linear filters with digital coefficients
can be specified by setting analog to False.
(#819 <https://github.com/nengo/nengo/pull/819>_)SqrtBeta distribution, which describes the distribution
of semantic pointer elements.
(#414 <https://github.com/nengo/nengo/issues/414>,
#430 <https://github.com/nengo/nengo/pull/430>)Triangle synapse, which filters with a triangular FIR filter.
(#660 <https://github.com/nengo/nengo/pull/660>_)utils.connection.eval_point_decoding function, which
provides a connection's static decoding of a list of evaluation points.
(#700 <https://github.com/nengo/nengo/pull/700>_)Simulator.reset).
(#582 <https://github.com/nengo/nengo/issues/582>,
#616 <https://github.com/nengo/nengo/issues/616>,
#652 <https://github.com/nengo/nengo/pull/652>_)#730 <https://github.com/nengo/nengo/issues/730>,
#791 <https://github.com/nengo/nengo/pull/791>)Product network is now more accurate.
(#651 <https://github.com/nengo/nengo/pull/651>_)#754 <https://github.com/nengo/nengo/pull/754>_)Config.configures now accepts multiple classes rather than
just one. (#842 <https://github.com/nengo/nengo/pull/842>_)add method to spa.Actions, which allows
actions to be added after module has been initialized.
(#861 <https://github.com/nengo/nengo/issues/861>,
#862 <https://github.com/nengo/nengo/pull/862>)spa.Bind
(#849 <https://github.com/nengo/nengo/pull/849>_)Voja (Vector Oja) learning rule type, which updates an
ensemble's encoders to fire selectively for its inputs. (see
examples/learning/learn_associations.ipynb).
(#727 <https://github.com/nengo/nengo/pull/727>_)#779 <https://github.com/nengo/nengo/pull/779>_)Voja learning rule.
(#768 <https://github.com/nengo/nengo/pull/768>_)nengo.synapses.LinearFilter now has an evaluate method to
evaluate the filter response to sine waves of given frequencies. This can
be used to create Bode plots, for example.
(#945 <https://github.com/nengo/nengo/pull/945>_)nengo.spa.Vocabulary objects now have a readonly attribute that
can be used to disallow adding new semantic pointers. Vocabulary subsets
are read-only by default.
(#699 <https://github.com/nengo/nengo/pull/699>_)#946 <https://github.com/nengo/nengo/pull/946>_)Bug fixes
Connection.seed through the constructor had
no effect. (#724 <https://github.com/nengo/nengo/issues/725>_)#632 <https://github.com/nengo/nengo/issues/632>_)#667 <https://github.com/nengo/nengo/issues/667>,
#671 <https://github.com/nengo/nengo/pull/671>)#714 <https://github.com/nengo/nengo/pull/714>_)rmses values in BuiltConnection.solver_info when using
NNls and Nnl2sL2 solvers, and the reg argument for Nnl2sL2.
(#839 <https://github.com/nengo/nengo/pull/839>_)spa.Vocabulary.create_pointer now respects the specified number of
creation attempts, and returns the most dissimilar pointer if none can be
found below the similarity threshold.
(#817 <https://github.com/nengo/nengo/pull/817>_)#973 <https://github.com/nengo/nengo/issues/973>,
#974 <https://github.com/nengo/nengo/pull/974>)with statements.
(#989 <https://github.com/nengo/nengo/pull/989>_)#946 <https://github.com/nengo/nengo/pull/946>_)Bug fixes
legacy.txt file cannot be read.
This can occur if a later version of Nengo is used.API changes
spa.State object replaces the old spa.Memory and spa.Buffer.
These old modules are deprecated and will be removed in 2.2.
(#796 <https://github.com/nengo/nengo/pull/796>_)2.0.2 is a bug fix release to ensure that Nengo continues to work with more recent versions of Jupyter (formerly known as the IPython notebook).
Behavioural changes
%load_ext nengo.ipynb.
(#693 <https://github.com/nengo/nengo/pull/693>_)Improvements
[progress] section to nengorc which allows setting
progress_bar and updater.
(#693 <https://github.com/nengo/nengo/pull/693>_)Bug fixes
#693 <https://github.com/nengo/nengo/pull/693>_)Behavioural changes
t as a float (instead of a NumPy scalar)
and x as a readonly NumPy array (instead of a writeable array).
(#626 <https://github.com/nengo/nengo/issues/626>,
#628 <https://github.com/nengo/nengo/pull/628>)Improvements
rasterplot works with 0 neurons, and generates much smaller PDFs.
(#601 <https://github.com/nengo/nengo/pull/601>_)Bug fixes
#627 <https://github.com/nengo/nengo/pull/627>_)Initial release of Nengo 2.0! Supports Python 2.6+ and 3.3+. Thanks to all of the contributors for making this possible!
FAQs
Tools for building and simulating large-scale neural models
We found that nengo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.