brainpy.math.operators.syn2post_min
brainpy.math.operators.syn2post_min#
- brainpy.math.operators.syn2post_min(syn_values, post_ids, post_num, indices_are_sorted=True)[source]#
The syn-to-post minimization computation.
This function is equivalent to:
post_val = np.zeros(post_num) for syn_i, post_i in enumerate(post_ids): post_val[post_i] = np.minimum(post_val[post_i], syn_values[syn_i])
- Parameters
syn_values (jax.numpy.ndarray, JaxArray, Variable) – The synaptic values.
post_ids (jax.numpy.ndarray, JaxArray) – The post-synaptic neuron ids. If
post_ids
is generated bybrainpy.conn.TwoEndConnector
, then it has sorted indices. Otherwise, this function cannot guarantee indices are sorted. You’s better setindices_are_sorted=False
.post_num (int) – The number of the post-synaptic neurons.
indices_are_sorted (whether
post_ids
is known to be sorted.) –
- Returns
post_val – The post-synaptic value.
- Return type
jax.numpy.ndarray, JaxArray