Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Consider Pint package for units & quantities #192

Description

@rebcabin

Consider using the Pint package for Units and Quantities

http://pint.readthedocs.org/en/0.6/

It seems well developed and tested. I've used it in several projects and cross-checked it with Wolfram Mathematica.

EDIT: it's also deeply integrated with numpy and scipy

Activity

  1. FRidh commented on Oct 11, 2015

    @FRidh
    Member

    Thanks for the suggestion, I did not know this package yet. Could you explain in what sense you use it?

    Compatibility with units and quantities would be great I think. So far no effort has really been put into this. There is a quantities module, of which the idea was to keep data regarding quantities together.

    The pint package seems to focus only on units, and not quantities. For example, say I have a signal which represents sound pressure. I could multiply it with pints pascal unit (or comparable). Now, if I want to plot the signal I could easily check the unit, and convert if necessary. But now I create a plot (e.g. using a method from the Signal class). On the axes I want to see the units, which I can easily obtain now, but also what quantity it is. The quantity in this case is pressure.

    Is there any way to obtain the quantity from a unit instance? I doubt that is included, since you can create an infinite amount of derived quantities with the same unit. I guess this aspect, meta data about the quantity, should be considered separately from support for (arithmetic with) units .

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions