nest / nest-simulator

The NEST simulator
http://www.nest-simulator.org
GNU General Public License v2.0
539 stars 365 forks source link

`+=` operator for parameter collections #2309

Closed WillemWybo closed 1 year ago

WillemWybo commented 2 years ago

Is your feature request related to a problem? Please describe. Collections of node parameters currently have to be set with a single command. We would like the option of appending further node parameters to the original parameter collection, as discussed here

Describe the solution you'd like Implementation of the += operator to append to parameter collections.

Describe alternatives you've considered N/A

Additional context E.g. for compartmental models, we can currently only do this:

cm = nest.Create('cm_default')

cm.compartments = [
    {"parent_idx": -1, "params": soma_params},
    {"parent_idx": 0, "params": dend_params}
]

But we would also like to be able to do this:

cm.compartments = {"parent_idx": -1, "params": soma_params}
cm.compartments += {"parent_idx": 0, "params": dend_params}
github-actions[bot] commented 2 years ago

Issue automatically marked stale!