From d19e23e5c178777a7751ccaebf1bd4dc1d385df3 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 20 Feb 2024 08:11:11 +0100 Subject: [PATCH] More informative error message for ReturnDataView.by_id --- python/sdist/amici/numpy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sdist/amici/numpy.py b/python/sdist/amici/numpy.py index fdf802147c..6e2966ba4b 100644 --- a/python/sdist/amici/numpy.py +++ b/python/sdist/amici/numpy.py @@ -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]