Skip to content

Commit

Permalink
Improved error message when numba-backend is not implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-zwicker committed Aug 20, 2024
1 parent 1dacc12 commit cd141ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pde/pdes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ def _make_pde_rhs_numba(
self, state: FieldBase, **kwargs
) -> Callable[[np.ndarray, float], np.ndarray]:
"""Create a compiled function for evaluating the right hand side."""
raise NotImplementedError("`numba` backend not implemented for right-hand side")
raise NotImplementedError(
"The right-hand side of the PDE is not implemented using the `numba` "
"backend. To add the implementation, provide the method "
"`_make_pde_rhs_numba`, which should return a numba-compiled function "
"calculating the right-hand side using numpy arrays as input and output."
)

def check_rhs_consistency(
self,
Expand Down

0 comments on commit cd141ef

Please sign in to comment.