From 78f4b4793c62b702e38b7425a55b55e2881e3434 Mon Sep 17 00:00:00 2001 From: Chaoming Wang Date: Sun, 7 Jan 2024 21:26:42 +0800 Subject: [PATCH] [math] upgrade variable retrival (#589) --- brainpy/_src/math/object_transform/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainpy/_src/math/object_transform/base.py b/brainpy/_src/math/object_transform/base.py index 25db8095f..aaf053ae7 100644 --- a/brainpy/_src/math/object_transform/base.py +++ b/brainpy/_src/math/object_transform/base.py @@ -328,7 +328,7 @@ def vars( nodes = self.nodes(method=method, level=level, include_self=include_self) gather = ArrayCollector() for node_path, node in nodes.items(): - for k in dir(node): + for k in node.__dict__.keys(): if k in node._excluded_vars: continue v = getattr(node, k)