Currently, values of the DataSample dict alias are NumPy arrays. A more backend-agnostic solution might be #131 and the new numpy.typing module, but an alternative might be to use a (possibly bound) TypeVar. This also might also improve deduced types in case there are scalar values in the data sample given to a Function/ParametrizedFunction (currently, this is marked as wrong by mypy/pyright).
Update below: #377 (comment)