Skip to content

Commit

Permalink
More informative error message for ReturnDataView.by_id (#2295)
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl authored Feb 20, 2024
1 parent ebd374a commit 0434802
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 0434802

Please sign in to comment.