spectrochempy.abs
- abs(dataset, dtype=None)[source]
Calculate the absolute value of the given NDDataset element-wise.
abs
is a shorthand for this function. For complex input, a + ib, the absolute value is \(\sqrt{ a^2 + b^2}\) .- Parameters:
dataset (
NDDataset
or array-like) – Input array or object that can be converted to an array.dtype (dtype) – The type of the output array. If dtype is not given, infer the data type from the other input arguments.
- Returns:
NDDataset
– The absolute value of each element in dataset.