Git Product home page Git Product logo

python-quantities's Introduction

quantities

pypi version |pypi download| Build status

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:

>>> 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

python-quantities's People

Contributors

ddale avatar bjodah avatar apdavison avatar jsalvatier avatar mankoff avatar robfalck avatar burnpanck avatar twmr avatar dopplershift avatar osechet avatar phippo avatar rsenk330 avatar a2takashi avatar lumbric avatar anadrome avatar p2jones avatar wilsaj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.