spectrochempy.Quantity¶
- class Quantity(value, units=None)[source]¶
Methods
Quantity.check
(dimension)Return true if the quantity's dimension matches passed dimension.
Quantity.compute
(**kwargs)Compute the Dask array wrapped by pint.PlainQuantity.
Quantity.dot
(b)Dot product of two arrays.
Quantity.from_list
(quant_list[, units])Transforms a list of Quantities into an numpy.array quantity.
Quantity.from_sequence
(cls, seq[, units])Transforms a sequence of Quantities into an numpy.array quantity.
Quantity.is_compatible_with
(self, other, ...)check if the other object is compatible
Quantity.ito
([other])Inplace rescale to different units.
Return PlainQuantity rescaled to plain units.
Return PlainQuantity scaled in place to reduced units, i.e. one unit per dimension.
Return PlainQuantity rescaled to root units.
Quantity.m_as
(units)PlainQuantity's magnitude expressed in particular units.
Quantity.persist
(**kwargs)Persist the Dask Array wrapped by pint.PlainQuantity.
Quantity.prod
(_prod_dispatcher)def prod(a[, ...])Return the product of quantity elements over a given axis
Quantity.to
([other])Return PlainQuantity rescaled to different units.
Return PlainQuantity rescaled to plain units.
Quantity.to_compact
([unit])"Return PlainQuantity rescaled to compact, human-readable units.
Return PlainQuantity scaled in place to reduced units, i.e. one unit per dimension.
Return PlainQuantity rescaled to root units.
Quantity.visualize
(**kwargs)Produce a visual representation of the Dask graph.
Attributes
Default formatting string.
returns: dict -- Dimensionality of the PlainQuantity, e.g.
PlainQuantity's magnitude.
PlainQuantity's magnitude.
PlainQuantity's units.
PlainQuantity's units.
- default_format = '~P'¶
Default formatting string.
- dimensionality¶
returns: dict – Dimensionality of the PlainQuantity, e.g.
{length: 1, time: -1}
- dimensionless¶
- unitless¶