Reference guide: NEST 2.x vs NEST 3.0

  • This guide shows changes to functions or their output between PyNEST 2.x and PyNEST 3.0

  • For additional changes in NEST 3.1 and beyond see our What’s new

  • Functions not mentioned are unchanged

  • Terms that changed for NEST 3.0 are marked in green

  • Please note that NEST 3.0 no longer supports Python 2

See also

To see more of the key changes in 3.0, check out our list here.

Suppress output on startup

NEST 2.x

NEST 3.0


import nest

nest.ll_api.init([“nest”, “–quiet”])

export PYNEST_QUIET = 1

import nest

Consistent use of allow_offgrid_times

NEST 2.x

NEST 3.0

nest.Create(“spike_generator”, params={“allow_offgrid_spikes”=True})

nest.Create(“spike_generator”, params={”allow_offgrid_times” =True})

Model names

  • The synapse model stdp_nn_pre-centered_synapse has been renamed to stdp_nn_pre_centered_synapse for consistency with the naming convention.


Parameters can now be used to set node and connection parameters.


Check out the section on Parametrization for example usage


The random module contains random distributions that can be used to set node and connection parameters, as well as positions for spatially distributed nodes.

NEST 2.x

NEST 3.0

nest.random.exponential(beta=1.0) returns nest.Parameter

nest.random.lognormal(mean=0.0, std=1.0) returns nest.Parameter

nest.random.normal(mean=0.0, std=1.0) returns nest.Parameter

nest.random.uniform(min=0.0, max=1.0) returns nest.Parameter


The spatial module contains parameters related to spatial positions for the nodes.

NEST 2.x

NEST 3.0

nest.spatial.distance.x nest.spatial.distance.y nest.spatial.distance.z returns nest.Parameter

nest.spatial.distance returns nest.Parameter, extent=None, edge_wrap=False, num_dimensions=None) returns nest.Parameter

nest.spatial.grid(shape, center=None, extent=None, edge_wrap=False) returns nest.Parameter

nest.spatial.pos.x nest.spatial.pos.y nest.spatial.pos.z returns nest.Parameter

nest.spatial.source_pos.x nest.spatial.source_pos.y nest.spatial.source_pos.z returns nest.Parameter

nest.spatial.target_pos.x nest.spatial.target_pos.y nest.spatial.target_pos.z returns nest.Parameter


The math module contains parameters for mathematical expressions. The mathematical expressions all take a nest.Parameter.


NEST 3.0

nest.math.exp(nest.Parameter) returns nest.Parameter

nest.math.sin(nest.Parameter) returns nest.Parameter

nest.math.cos(nest.Parameter) returns nest.Parameter

nest.math.min(nest.Parameter, value) returns nest.Parameter

nest.math.max(nest.Parameter, value) returns nest.Parameter

nest.math.redraw(nest.Parameter, min, max) returns nest.Parameter


The logic module contains logical expressions between nest.Parameter’s.

NEST 2.x

NEST 3.0

nest.logic.conditional(condition, param_if_true, param_if_false) returns nest.Parameter


The spatial_distributions module contains random distributions that take a spatial parameter as input and applies the distribution on the parameter. They are used for spatially distributed nodes.

NEST 2.x

NEST 3.0

nest.spatial_distributions.exponential(nest.Parameter, beta=1.0) returns nest.Parameter

nest.spatial_distributions.gaussian(nest.Parameter, mean=0.0, std=1.0) returns nest.Parameter

nest.spatial_distributions.gaussian2D(nest.Parameter, nest.Parameter, mean_x=0.0, mean_y=0.0, std_x=1.0, std_y=1.0, rho=0.0) returns nest.Parameter

nest.spatial_distributions.gamma(nest.Parameter, kappa=1.0 theta=1.0) returns nest.Parameter

What’s removed from NEST 3.0?


Subnets are gone. Instead NodeCollections should be used to group and organize neurons.

NEST 2.x

NEST 3.0

net = nest.LayoutNetwork(model, dim)
nrns = nest.GetLeaves(net)[0]
nrns = nest.Create(model, dim)

Printing the network as a tree of subnets is no longer possible. The PrintNetwork() function has been replaced with PrintNodes(), which prints ID ranges and model names of the nodes in the network.

NEST 2.x

NEST 3.0

>>>  nest.PrintNetwork(depth=2, subnet=None)
     [0] root dim=[15]
     [1]...[10] iaf_psc_alpha
     [11]...[15] iaf_psc_exp
>>>  nest.PrintNodes()
     1 .. 10 iaf_psc_alpha
     11 .. 15 iaf_psc_exp


With NEST 3.0, some models have been removed. They all have alternative models that can be used instead.

Removed model

Replacement model










no longer needed, use NodeCollection instead



Furthermore, the model iaf_tum_2000 has been renamed to iaf_psc_exp_htum. iaf_psc_exp_htum is the exact same model as iaf_tum_2000, it has just been renamed to match NEST’s naming conventions.


Some functions have also been removed. The removed functions where either related to subnets, or they can be replaced by using other functions with indexing into a NodeCollection.

The following functions have been removed:

  • BeginSubnet

  • ChangeSubnet

  • CurrentSubnet

  • EndSubnet

  • GetChildren

  • GetLayer

  • GetLeaves

  • GetLID

  • GetNetwork

  • LayoutNetwork

See Functions related to subnets

  • ResetNetwork

See Functions related to simulation

  • DataConnect

  • DisconnectOneToOne

  • CGConnect

See Functions related to connection

  • GetElement

See Functions related to spatially distributed nodes

  • RestoreNodes

(have never existed on PyNEST level, it was only a SLI function)