コード例 #1
0
ファイル: __init__.py プロジェクト: apdavison/sPyNNaker8
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)
コード例 #2
0
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)
コード例 #3
0
def test_initialize():
    p = MockPopulation()
    common.initialize(p, 'v', -65.0)
    assert p.initializations == [('v', -65.0)]
コード例 #4
0
def test_initialize():
    p = MockPopulation()
    common.initialize(p, 'v', -65.0)
    assert p.initializations == [('v', -65.0)]