Thank you @Seanny123!
To not open another topic, I reply here in order to receive some help, if it is possible. Of course, you can close this topic or move to a new one.
I’ve to implement this kind of learning rule (Arena et al., 2009)
where:
 Δt = t_{pre}  t_{post}, depends on the presynaptic and postsynaptic activities.
 ε(t) is the synaptic response and,

I_{j} is the synaptic current of the jth postsynaptic neuron due to all the presynaptic neurons with whom the postsynaptic neuron is linked to.
I’m looking your repository and it has been very helpful! In any case, I have to manage the presynaptic and postsynaptic times in order to update the weights, according to (1). How can I do that? Are there some attributes that I can use?
If it can be useful, this is the class I’ve implemented but I have some problems to implement properly the function of the class.
class STDP(object):
def __init__(self, tau= 0.005, tau_plus=0.020, tau_minus=0.010, learning_rate=1e6,
in_neurons=1, out_neurons=1, A_plus=0.2, A_minus=0.2,
sample_every=0.1, start_weights=weights):
self.up_weights = start_weights.copy()
# Parameters of the synapse
self.A_plus = A_plus
self.A_minus = A_minus
self.tau_plus = tau_plus
self.tau_minus = tau_minus
self.tau = tau
self.in_nrns = in_neurons
# Impulse response of the synapse
self.epsilon = np.exp(1)*nengo.Lowpass(tau).make_step(in_neurons, in_neurons, dt, None)
self.weight_history = []