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.