Skip to content

Commit

Permalink
More informative error message for ReturnDataView.by_id
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Feb 20, 2024
1 parent 5bd921f commit d19e23e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/sdist/amici/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ def by_id(
) or self._swigptr.parameter_ids
else:
raise NotImplementedError(
f"Subsetting {field} by ID is not implemented or not possible."
f"Subsetting `{field}` by ID (`{entity_id}`) "
"is not implemented or not possible."
)
col_index = ids.index(entity_id)
return getattr(self, field)[:, ..., col_index]
Expand Down

0 comments on commit d19e23e

Please sign in to comment.