Skip to content

Make DataSample values generic to support shape typing #377

Description

@redeboer

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions