We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7bb63a commit 132fe43Copy full SHA for 132fe43
brainpy/_src/math/ndarray.py
@@ -98,7 +98,7 @@ def _check_tracer(self):
98
self_value = self.value
99
if hasattr(self_value, '_trace') and hasattr(self_value._trace.main, 'jaxpr_stack'):
100
if len(self_value._trace.main.jaxpr_stack) == 0:
101
- raise RuntimeError('This Array is modified during the transformation. '
+ raise jax.errors.UnexpectedTracerError('This Array is modified during the transformation. '
102
'BrainPy only supports transformations for Variable. '
103
'Please declare it as a Variable.') from jax.core.escaped_tracer_error(self_value, None)
104
return self_value
0 commit comments