Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
quantities/ | H | 16-Aug-2021 | - | 9,512 | 8,146 | |
PKG-INFO | H A D | 16-Aug-2021 | 1.1 KiB | 25 | 22 | |
README.rst | H A D | 22-Feb-2019 | 2.2 KiB | 83 | 57 | |
setup.cfg | H A D | 22-Feb-2019 | 170 | 7 | 7 | |
setup.py | H A D | 22-Feb-2019 | 4.4 KiB | 151 | 101 | |
versioneer.py | H A D | 22-Feb-2019 | 67 KiB | 1,823 | 1,415 |
README.rst
1========== 2quantities 3========== 4 5|pypi version| |pypi download| |Build status| 6 7.. |pypi version| image:: https://img.shields.io/pypi/v/quantities.png 8 :target: https://pypi.python.org/pypi/quantities 9.. |Build status| image:: https://secure.travis-ci.org/python-quantities/python-quantities.png?branch=master 10 :target: http://travis-ci.org/python-quantities/python-quantities 11 12A Python package for handling physical quantities. The source code and issue 13tracker are hosted on github: 14 15https://www.github.com/python-quantities/python-quantities 16 17Download 18-------- 19Get the latest version of quantities from 20https://pypi.python.org/pypi/quantities/ 21 22To get the git version do:: 23 24 $ git clone git://github.com/python-quantities/python-quantities.git 25 26 27Documentation and usage 28----------------------- 29You can find the official documentation at: 30 31http://python-quantities.readthedocs.io/ 32 33Here is a simple example: 34 35.. code:: python 36 37 >>> import quantities as pq 38 >>> distance = 42*pq.metre 39 >>> time = 17*pq.second 40 >>> velocity = distance / time 41 >>> "%.3f %s" % (velocity.magnitude, velocity.dimensionality) 42 '2.471 m/s' 43 >>> velocity + 3 44 Traceback (most recent call last): 45 ... 46 ValueError: Unable to convert between units of "dimensionless" and "m/s" 47 48Installation 49------------ 50quantities has a hard dependency on the `NumPy <http://www.numpy.org>`_ library. 51You should install it first, please refer to the NumPy installation guide: 52 53http://docs.scipy.org/doc/numpy/user/install.html 54 55To install quantities itself, then simply run:: 56 57 $ python setup.py install --user 58 59If you install it system-wide, you may need to prefix the previous command with ``sudo``:: 60 61 $ sudo python setup.py install 62 63Tests 64----- 65To execute all tests, run:: 66 67 $ python setup.py test 68 69in the current directory. The master branch is automatically tested by 70Travis CI. 71 72Author 73------ 74quantities is written by Darren Dale 75 76License 77------- 78Quantities only uses BSD compatible code. See the Open Source 79Initiative `licenses page <http://www.opensource.org/licenses>`_ 80for details on individual licenses. 81 82See `doc/user/license.rst <doc/user/license.rst>`_ for further details on the license of quantities 83