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)