ytree.data_structures.arbor.Arbor.quan

property Arbor.quan

Create a unyt_quantity using the Arbor’s unit system.

Parameters:
  • input_array (Iterable) – A tuple, list, or array to attach units to

  • units (String unit specification, unit symbol or astropy object) – The units of the array. Powers must be specified using python syntax (cm**3, not cm^3).

  • dtype (string or NumPy dtype object) – The dtype of the returned array data

Examples

>>> import ytree
>>> a = ytree.load("consistent_trees/tree_0_0_0.dat")
>>> a.quan(34, "cm")
unyt_quantity(34, 'cm')