nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Parameter in ConnectLayers doesn't accept integer.

Open babsey opened this issue 2 years ago • 1 comments

Describe the bug With network of spatial neurons, it shows an error in nest.Connect call when the function has spatial distribution, e.g. for p and any synaptic specification is an integer:

NESTErrors.BadProperty: BadProperty in SLI function ConnectLayers_g_g_D: Parameter must be parametertype, constant or dictionary.

To Reproduce

import nest
nest.ResetKernel()

positions = nest.spatial.free(nest.random.uniform(-0.5, 0.5), num_dimensions=2)
n1 = nest.Create("iaf_psc_alpha", positions=positions)

nest.Connect(n1, n1,
    conn_spec={"rule": "pairwise_bernoulli", "p": nest.spatial.distance},
    syn_spec={"weight": 1},
)

But it works when synaptic weight is float.

Expected behavior As other parameters it should accept integers.

babsey avatar May 18 '22 12:05 babsey

Issue automatically marked stale!

github-actions[bot] avatar Jul 23 '22 08:07 github-actions[bot]