A package for handling numpy arrays with units
Project description
unyt
A package for handling numpy arrays with units
Features
Often writing code that deals with data that has units can be confusing. A function might return an array but at least with plain NumPy arrays, there is no way to easily tell what the units of the data are without somehow knowing a prioi.
The unyt package provides a subclass of NumPy’s ndarray class that knows about units. For example, one could do:
>>> import unyt ... >>> cars = ['toyota', 'volkswagen', 'honda'] >>> distance_traveled = [3.4, 5.8, 7.2] * unyt.mile ... >>> print(distance_traveled.to('km')) [ 5.4717696 9.3341952 11.5872768] km
And a whole lot more! See the documentation for more examples as well as full API docs.
Code of Conduct
The unyt package is part of The yt Project <https://yt-project.org>. Participating in unyt development therefore happens under the auspices of the yt community code of conduct <http://yt-project.org/doc/developing/developing.html#yt-community-code-of-conduct>. If for any reason you feel that the code of conduct has been violated, please send an e-mail to confidential@yt-project.org with details describing the incident. All emails sent to this address will be treated with the strictest confidence.
License
The unyt package is licensed under the BSD 3-clause license. If you make use of unyt in a publication we would appreciate a mention in the text of the paper or in the acknowledgements.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
unyt began life as a submodule of yt named yt.units.
It was separated from yt.units as its own package in 2018.
0.1.0 (2018-03-28)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file unyt-1.0.1.tar.gz
.
File metadata
- Download URL: unyt-1.0.1.tar.gz
- Upload date:
- Size: 144.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4a135bdcd79fcb4130f16ca8665ffc3407e2af6f83f2e7debcc2a7459c4e0f01
|
|
MD5 |
e0d820200dac7c53ac068bb5cc9aa4cb
|
|
BLAKE2b-256 |
e7ec471d5bdbbcad2f8af70cd1a7004d180c8071c547aedefc9b36b8ad3f5ed5
|
File details
Details for the file unyt-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: unyt-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 50.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f65cba38847ec9f917d1746c3cc0a59ccba1341f911acbe5f0a290439bbf60b1
|
|
MD5 |
f6915d387fb575a3db8b9b89f51b1609
|
|
BLAKE2b-256 |
59d1e66c7a69cb8556e294776ecbdc008f69c1ba3a3a3e96a58f69a7512941cb
|