Skip to content

PlainQuantity from_list and from_sequence typing is wrong #2257

@MatthieuDartiailh

Description

@MatthieuDartiailh

from_list and from_sequence are explicitly meant to create a Quantity wrapping an ndarray.

Currently the typing indicate it return a Quantity whose magnitude is of the same type as the type as the input Quantities (see https://github.com/hgrecco/pint/blob/master/pint/facets/plain/quantity.py#L361) which is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions