def initialize(cells, **initial_values): """ Sets cells to be initialised to the given values :param cells: the cells to change params on :param initial_values: the params and there values to change :rtype: None """ if not globals_variables.has_simulator(): raise ConfigurationException(FAILED_STATE_MSG) pynn_common.initialize(cells, **initial_values)
def initialize(cells, **initial_values): """ Sets cells to be initialised to the given values :param cells: the cells to change params on :type cells: ~spynnaker.pyNN.models.populations.Population or ~spynnaker.pyNN.models.populations.PopulationView :param initial_values: the params and their values to change """ globals_variables.check_simulator() pynn_common.initialize(cells, **initial_values)
def test_initialize(): p = MockPopulation() common.initialize(p, 'v', -65.0) assert p.initializations == [('v', -65.0)]