Skip to content

Make DataSample values generic to support shape typing #377

@redeboer

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions