This is A PREVIEW for NEST 3.0 and NOT an OFFICIAL RELEASE! Some functionality may not be available and information may be incomplete!

NEST 3.0: Detailed transition guide

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

  • 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 code examples of the key changes, check out our NEST 3.0: What’s new? guide.

Suppress output on startup

NEST 2.x

NEST 3.0


import nest

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

export PYNEST_QUIET = 1

import nest


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

nest.spatial.free(pos, 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