superneuromat.SNN.delete_synapse#

SNN.delete_synapse(synapse_id: int | Synapse, reindex: bool = True, _rebuild_connection_ids: bool = True)[source]#

Deletes a synapse from the network.

Because synapses are stored in the SNN as a list, deleting a synapse may cause a shift in the indices of other synapses. If you are manually modifying the lists of synapse parameters, you may find it hard to keep track of what’s what.

However, if you use Synapses or a SynapseListView, then the shift in indices will be automatically handled, and those objects will reflect the new indices while still referring to the same synapses that you’d expect.

Warning

Deleting synapses may result in unexpected behavior, as it can cause large shifts in the indices of synapses. Use with caution.

Parameters:

synapse_id (int or Synapse) – The ID of the synapse to delete.

Returns:

A mapping of synaptic IDs from {before: after} the synapse was deleted. May be empty.

Return type:

dict