Skip to content

Commit 132fe43

Browse files
committed
Update ndarray.py
1 parent c7bb63a commit 132fe43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: brainpy/_src/math/ndarray.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _check_tracer(self):
9898
self_value = self.value
9999
if hasattr(self_value, '_trace') and hasattr(self_value._trace.main, 'jaxpr_stack'):
100100
if len(self_value._trace.main.jaxpr_stack) == 0:
101-
raise RuntimeError('This Array is modified during the transformation. '
101+
raise jax.errors.UnexpectedTracerError('This Array is modified during the transformation. '
102102
'BrainPy only supports transformations for Variable. '
103103
'Please declare it as a Variable.') from jax.core.escaped_tracer_error(self_value, None)
104104
return self_value

0 commit comments

Comments
 (0)