# python-quantities **Repository Path**: mirrors_lepy/python-quantities ## Basic Information - **Project Name**: python-quantities - **Description**: Quantities package for the python programming language - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2025-07-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ========== quantities ========== |pypi version| |pypi download| |Build status| .. |pypi version| image:: https://img.shields.io/pypi/v/quantities.png :target: https://pypi.python.org/pypi/quantities .. |Build status| image:: https://secure.travis-ci.org/python-quantities/python-quantities.png?branch=master :target: http://travis-ci.org/python-quantities/python-quantities A Python package for handling physical quantities. The source code and issue tracker are hosted on github: https://www.github.com/python-quantities/python-quantities Download -------- Get the latest version of quantities from https://pypi.python.org/pypi/quantities/ To get the git version do:: $ git clone git://github.com/python-quantities/python-quantities.git Documentation and usage ----------------------- You can find the official documentation at: http://python-quantities.readthedocs.io/ Here is a simple example: .. code:: python >>> import quantities as pq >>> distance = 42*pq.metre >>> time = 17*pq.second >>> velocity = distance / time >>> "%.3f %s" % (velocity.magnitude, velocity.dimensionality) '2.471 m/s' >>> velocity + 3 Traceback (most recent call last): ... ValueError: Unable to convert between units of "dimensionless" and "m/s" Installation ------------ quantities has a hard dependency on the `NumPy `_ library. You should install it first, please refer to the NumPy installation guide: http://docs.scipy.org/doc/numpy/user/install.html To install quantities itself, then simply run:: $ python setup.py install --user If you install it system-wide, you may need to prefix the previous command with ``sudo``:: $ sudo python setup.py install Tests ----- To execute all tests, run:: $ python setup.py test in the current directory. The master branch is automatically tested by Travis CI. Author ------ quantities is written by Darren Dale License ------- Quantities only uses BSD compatible code. See the Open Source Initiative `licenses page `_ for details on individual licenses. See `doc/user/license.rst `_ for further details on the license of quantities