pre2syn#
- class brainpy.math.pre2syn(pre_values, pre_ids)[source]#
The pre-to-syn computation.
Change the pre-synaptic data to the data with the dimension of synapses.
This function is equivalent to:
syn_val = np.zeros(len(pre_ids)) for syn_i, pre_i in enumerate(pre_ids): syn_val[i] = pre_values[pre_i]
- Parameters:
pre_values (float, ArrayType) – The pre-synaptic value.
pre_ids (ArrayType) – The pre-synaptic neuron index.
- Returns:
syn_val – The synaptic value.
- Return type:
ArrayType