Skip to content

Commit

Permalink
Add check for invalid kwarg, avoid reusing common argname
Browse files Browse the repository at this point in the history
  • Loading branch information
f0uriest committed Jul 10, 2024
1 parent f5281e5 commit 375d87e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions desc/compute/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def _compute(
cannot give the argument basis='xyz' since that will break the recursion. In that
case, either call above function or manually convert the output to xyz basis.
"""
assert kwargs.get("basis", "rpz") == "rpz", "_compute only works in rpz coordinates"
parameterization = _parse_parameterization(parameterization)
if isinstance(names, str):
names = [names]
Expand Down
2 changes: 1 addition & 1 deletion desc/magnetic_fields/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ def compute(
names,
obj=self,
grid=grid,
method=kwargs.pop("method", "auto"),
jitable=kwargs.pop("jitable", False),
**kwargs,
)
if data is None:
Expand Down

0 comments on commit 375d87e

Please sign in to comment.