Skip to content

Decorator for converting quantity to arrays in specific units? #7368

Description

@mhvk

I know this was discussed some time ago on the mailing list (I know @taldcroft expressed a wish for it), and thought there was an issue already, but couldn't find it: for some functions based on regular ndarray it would be good to have a decorator that converts input to a required unit and then takes the value, i.e., input.to_value(...). If the decorator is sufficiently clever, it would also including converting multiple inputs to the same unit (e.g., that of the first argument), something that is currently done in, e.g., _unquantity_allclose_arguments.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions