weldx.Q_¶
- class weldx.Q_(value, units=None)¶
Create a quantity from a scalar or array.
The quantity class supports lots of physical units and will combine them during mathematical operations. For extended details on working with quantities, please see the pint documentation
Examples
>>> from weldx import Q_ >>> length = Q_(10, "mm") >>> length <Quantity(10, 'millimeter')>
define a time:
>>> time = Q_(1, "s") >>> time <Quantity(1, 'second')>
lets combine length and time to get a velocity.
>>> v = length / time >>> v <Quantity(10.0, 'millimeter / second')>
Methods
Return true if the quantity's dimension matches passed dimension.
Compute the Dask array wrapped by pint.Quantity.
Dot product of two arrays.
Transforms a list of Quantities into an numpy.array quantity.
Transforms a sequence of Quantities into an numpy.array quantity.
check if the other object is compatible
Inplace rescale to different units.
Return Quantity rescaled to base units.
Return Quantity scaled in place to reduced units, i.e. one unit per dimension.
Return Quantity rescaled to root units.
Quantity's magnitude expressed in particular units.
Persist the Dask Array wrapped by pint.Quantity.
Return the product of quantity elements over a given axis
Return Quantity rescaled to different units.
Return Quantity rescaled to base units.
"Return Quantity rescaled to compact, human-readable units.
Return Quantity scaled in place to reduced units, i.e. one unit per dimension.
Return Quantity rescaled to root units.
Produce a visual representation of the Dask graph.
Attributes
Default formatting string.
- returns
Dimensionality of the Quantity, e.g.
{length: 1, time: -1}
Quantity's magnitude.
Quantity's magnitude.
Quantity's units.
Quantity's units.