Skip to content

Comparison between quantities and plain numbers is inconsistent and unsafe #245

Description

@wagenadl

If I have a quantity with a unit, e.g.,

 t = 50 * pq.ms

then

t > 1

returns True whereas

t.simplified > 1

returns False. Arguably, both should raise a ValueError just like

t - 1

does in this example.

If the community agrees, I would be happy to prepare a pull request to change the behavior.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions