2 Star 0 Fork 0

mirrors_lepy/python-quantities

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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

空文件

简介

Quantities package for the python programming language 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_lepy/python-quantities.git
git@gitee.com:mirrors_lepy/python-quantities.git
mirrors_lepy
python-quantities
python-quantities
master

搜索帮助