unyt¶
This is the documentation for unyt
(pronounced like “unit”). unyt
is a Python
library for working with data that has physical units. It was
originally developed as part of the yt Project and
was split out as an independent project so that other Python projects can easily
make use of it.
The unyt library defines the unyt.array.unyt_array
and
unyt.array.unyt_quantity
classes for handling arrays and scalars with
units, respectively.
In addition, unyt
provides a number of predefined units and physical constants
that can be directly imported from from the unyt
namespace:
>>> from unyt import G, Mearth, Rearth
>>> v_esc = (2 * G * Mearth / Rearth) ** (1.0 / 2)
>>> print(v_esc.to("km/s"))
11.254544657958482 km/s
Contents:
- Installation
- Working with
unyt
- Listing of Units
- Listing of Physical Constants
- API Documentation
- Contributing
- Citing
unyt
- Credits
- History
- 3.0.4 (2025-03-13)
- 3.0.3 (2024-07-02)
- 3.0.2 (2024-03-13)
- 3.0.1 (2023-11-02)
- 3.0.0 (2023-11-01)
- 2.9.5 (2023-02-22)
- 2.9.4 (2023-02-06)
- 2.9.3 (2022-12-07)
- 2.9.2 (2022-07-20)
- 2.9.0 (2022-07-14)
- 2.8.0 (2020-10-05)
- 2.7.2 (2020-06-29)
- 2.7.1 (2020-02-17)
- 2.7.0 (2020-02-06)
- 2.6.0 (2020-01-22)
- 2.5.0 (2020-01-20)
- 2.4.1 (2020-01-10)
- 2.4.0 (2019-10-25)
- 2.3.1 (2019-08-21)
- 2.3.0 (2019-08-14)
- 2.2.2 (2019-07-03)
- 2.2.1 (2019-07-02)
- 2.2.0 (2019-04-03)
- 2.1.1 (2019-03-27)
- 2.1.0 (2019-03-26)
- 2.0.0 (2019-03-08)
- 1.0.7 (2018-08-13)
- 1.0.6 (2018-08-13)
- 1.0.5 (2018-08-03)
- 1.0.4 (2018-06-08)
- 1.0.3 (2018-06-06)
- 1.0.2 (2018-06-06)
- 1.0.1 (2018-05-24)
- 1.0.0 (2018-05-24)