1
2
3
4
5
6
7
8
9
10
11
12
13
14
use num::Signed;

use crate::prelude::*;

impl<T: PolarsNumericType> ChunkedArray<T>
where
    T::Native: Signed,
{
    /// Convert all values to their absolute/positive value.
    #[must_use]
    pub fn abs(&self) -> Self {
        self.apply(|v| v.abs())
    }
}