Find the median along a given dimension Parameters - `input` is the input Array - `dim` is dimension along which median has to be found Return Values An Array whose size is equal to input except along the dimension which median needs to be found. Array size along `dim` will be reduced to one.
(input: &Array<T>, dim: i64)
| 75 | /// An Array whose size is equal to input except along the dimension which |
| 76 | /// median needs to be found. Array size along `dim` will be reduced to one. |
| 77 | pub fn median<T>(input: &Array<T>, dim: i64) -> Array<T> |
| 78 | where |
| 79 | T: HasAfEnum + MedianComputable, |
| 80 | { |
| 81 | unsafe { |
| 82 | let mut temp: af_array = std::ptr::null_mut(); |
| 83 | let err_val = af_median(&mut temp as *mut af_array, input.get(), dim); |
| 84 | HANDLE_ERROR(AfError::from(err_val)); |
| 85 | temp.into() |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | macro_rules! stat_func_def { |
| 90 | ($doc_str: expr, $fn_name: ident, $ffi_fn: ident) => { |
nothing calls this directly
no test coverage detected