• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

quantities/H16-Aug-2021-9,5128,146

PKG-INFOH A D16-Aug-20211.1 KiB2522

README.rstH A D22-Feb-20192.2 KiB8357

setup.cfgH A D22-Feb-2019170 77

setup.pyH A D22-Feb-20194.4 KiB151101

versioneer.pyH A D22-Feb-201967 KiB1,8231,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