Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoming0625 committed Mar 5, 2024
1 parent da800da commit c4d78bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions brainpy/_src/dynsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ def __call__(self, *args, **kwargs):
# ``after_updates``
for model in self.after_updates.values():
if hasattr(model, '_not_receive_update_output'):
model(ret)
else:
model()
else:
model(ret)
return ret

def __rrshift__(self, other):
Expand Down Expand Up @@ -883,7 +883,8 @@ def receive_update_output(cls: object):
"""
# assert isinstance(cls, DynamicalSystem), 'The input class should be instance of DynamicalSystem.'
cls._not_receive_update_output = True
if hasattr(cls, '_not_receive_update_output'):
delattr(cls, '_not_receive_update_output')
return cls


Expand All @@ -899,8 +900,7 @@ def not_receive_update_output(cls: object):
"""
# assert isinstance(cls, DynamicalSystem), 'The input class should be instance of DynamicalSystem.'
if hasattr(cls, '_not_receive_update_output'):
delattr(cls, '_not_receive_update_output')
cls._not_receive_update_output = True
return cls


Expand Down

0 comments on commit c4d78bc

Please sign in to comment.