spynnaker.pyNN.models.neural_properties package

Module contents

class spynnaker.pyNN.models.neural_properties.NeuronParameter(value, data_type)[source]

Bases: object

A settable parameter of a neuron model.

Parameters:
get_dataspec_datatype()[source]

Get the serialization type of the parameter in the neuron model.

Return type:DataType
get_value()[source]

What the value of the parameter is; if a list or array, potentially provides a different value for each neuron.

Return type:int or float or bool or list(int) or list(float) or list(bool) or ndarray or AbstractList
iterator_by_slice(slice_start, slice_stop, spec)[source]

Creates an iterator over the commands to use to write the parameter to the data specification being generated.

Parameters:
  • slice_start (int) – Inclusive start of the range
  • slice_stop (int) – Exclusive end of the range
  • spec (DataSpecificationGenerator) – The data specification to eventually write to. (Note that this does not actually do the write).
Returns:

Iterator that produces a command to write to the specification for each element in the slice.

Return type:

iterator(tuple(bytearray, str))