to_start_stop function

(Shortest import: from brian2.groups.neurongroup import to_start_stop)

brian2.groups.neurongroup.to_start_stop(item, N)[source]

Helper function to transform a single number, a slice or an array of contiguous indices to a start and stop value. This is used to allow for some flexibility in the syntax of specifying subgroups in NeuronGroup and SpatialNeuron.