unyt package¶

The unyt package.

Note that the symbols defined in unyt.physical_constants and unyt.unit_symbols are importable from this module. For example:

>>> from unyt import km, clight
>>> print((km/clight).to('ns'))
3335.64095198152 ns

In addition, the following functions and classes are importable from the top-level unyt namespace:

  • unyt.array.loadtxt()
  • unyt.array.savetxt()
  • unyt.test()
  • unyt.array.uconcatenate()
  • unyt.array.ucross()
  • unyt.array.udot()
  • unyt.array.uhstack()
  • unyt.array.uintersect1d()
  • unyt.array.unorm()
  • unyt.array.ustack()
  • unyt.array.uunion1d()
  • unyt.array.uvstack()
  • unyt.array.unyt_array
  • unyt.array.unyt_quantity
  • unyt.unit_object.define_unit()
  • unyt.unit_object.Unit
  • unyt.unit_registry.UnitRegistry
  • unyt.unit_systems.UnitSystem
  • unyt.testing.assert_allclose_units()
  • unyt.array.allclose_units()
  • unyt.dimensions.accepts()
  • unyt.dimensions.returns()
unyt.test()[source]¶

Execute the unit tests on an installed copy of unyt.

Note that this function requires pytest to run. If pytest is not installed this function will raise ImportError.

Submodules¶

  • unyt.array module
  • unyt.dimensions module
  • unyt.equivalencies module
  • unyt.exceptions module
  • unyt.mpl_interface module
  • unyt.physical_constants module
  • unyt.testing module
  • unyt.unit_object module
  • unyt.unit_registry module
  • unyt.unit_symbols module
  • unyt.unit_systems module

Logo

unyt

Navigation

Contents:

  • Installation
  • Working with unyt
  • Listing of Units
  • Listing of Physical Constants
  • API Documentation
    • Submodules
      • unyt.array module
      • unyt.dimensions module
      • unyt.equivalencies module
      • unyt.exceptions module
      • unyt.mpl_interface module
      • unyt.physical_constants module
      • unyt.testing module
      • unyt.unit_object module
      • unyt.unit_registry module
      • unyt.unit_symbols module
      • unyt.unit_systems module
  • Contributing
  • Citing unyt
  • Credits
  • History

Related Topics

  • Documentation overview
    • Previous: Listing of Units
    • Next: unyt.array module

Quick search

©2022, The yt Project. | Powered by Sphinx 1.8.6 & Alabaster 0.7.13 | Page source