# groups package

Package providing groups such as `NeuronGroup` or `PoissonGroup`.

Exported members: `CodeRunner`, `Group`, `NeuronGroup`, `VariableOwner`

## `group` module

This module defines the `VariableOwner` class, a mix-in class for everything that saves state variables, e.g. `Clock` or `NeuronGroup`, the class `Group` for objects that in addition to storing state variables also execute code, i.e. objects such as `NeuronGroup` or `StateMonitor` but not `Clock`, and finally `CodeRunner`, a class to run code in the context of a `Group`.

Exported members: `CodeRunner`, `Group`, `VariableOwner`

Classes

`CodeRunner`(*args, **kw) | A "code runner" that runs a `CodeObject` every timestep and keeps a reference to the `Group`.

`Group`(*args, **kw) |

`IndexWrapper`(group) | Convenience class to allow access to the indices via indexing syntax.

`Indexing`(group[, default_index]) | Object responsible for calculating flat index arrays from arbitrary group- specific indices.

`VariableOwner`(*args, **kw) | Mix-in class for accessing arrays by attribute.

Functions

`get_dtype`(equation[, dtype]) | Helper function to interpret the `dtype` keyword argument in `NeuronGroup` etc.

## `neurongroup` module

This model defines the `NeuronGroup`, the core of most simulations.

Exported members: `NeuronGroup`

Classes

`NeuronGroup`(*args, **kw) | A group of neurons.

`Resetter`(*args, **kw) | The `CodeRunner` that applies the reset statement(s) to the state variables of neurons that have spiked in this timestep.

`StateUpdater`(*args, **kw) | The `CodeRunner` that updates the state variables of a `NeuronGroup` at every timestep.

`SubexpressionUpdater`(*args, **kw) | The `CodeRunner` that updates the state variables storing the values of subexpressions that have been marked as "constant over dt".

`Thresholder`(*args, **kw) | The `CodeRunner` that applies the threshold condition to the state variables of a `NeuronGroup` at every timestep and sets its `spikes` and `refractory_until` attributes.

Functions

`check_identifier_pre_post`(identifier) | Do not allow names ending in `_pre` or `_post` to avoid confusion.

`to_start_stop`(item, N) | Helper function to transform a single number, a slice or an array of contiguous indices to a start and stop value.

## `subgroup` module

Exported members: `Subgroup`

Classes

`Subgroup`(*args, **kw) | Subgroup of any `Group`