From 64d8f54c34b8cdacd32274ca74aca7bfb639e0f6 Mon Sep 17 00:00:00 2001 From: yunhui <38786521+CloudyDory@users.noreply.github.com> Date: Thu, 22 Feb 2024 22:56:23 +0800 Subject: [PATCH] Fix delayvar not correct in concat mode (#632) --- brainpy/_src/math/delayvars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainpy/_src/math/delayvars.py b/brainpy/_src/math/delayvars.py index 390e04dd..676e4286 100644 --- a/brainpy/_src/math/delayvars.py +++ b/brainpy/_src/math/delayvars.py @@ -473,7 +473,7 @@ def update(self, value: Union[numbers.Number, Array, jax.Array] = None): elif self.update_method == CONCAT_UPDATE: if self.num_delay_step >= 2: - self.data.value = concatenate([expand_dims(value, 0), self.data[1:]], axis=0) + self.data.value = concatenate([expand_dims(value, 0), self.data[:-1]], axis=0) else: self.data[:] = value