From c8535a8772bb10a311e6d6a82f2c69bdeee6e416 Mon Sep 17 00:00:00 2001 From: Seung Hyun Kim Date: Sun, 30 Jun 2024 21:04:52 -0500 Subject: [PATCH] fix: first callback execution --- elastica/modules/callbacks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elastica/modules/callbacks.py b/elastica/modules/callbacks.py index 9d886926..4028b94a 100644 --- a/elastica/modules/callbacks.py +++ b/elastica/modules/callbacks.py @@ -74,6 +74,9 @@ def _finalize_callback(self: SystemCollectionProtocol) -> None: self._callback_list.clear() del self._callback_list + # First callback execution + self.apply_callbacks(time=np.float64(0.0), current_step=0) + class _CallBack: """