MCPcopy Index your code
hub / github.com/arrayfire/arrayfire-rust / var_v2

Function var_v2

src/statistics/mod.rs:177–193  ·  view source on GitHub ↗

Compute Variance along a specific dimension # Parameters - `arr` is the input Array - `bias_kind` of type [VarianceBias][1] denotes the type of variane to be computed - `dim` is the dimension along which the variance is extracted # Return Values Array with variance of input Array `arr` along dimension `dim`. [1]: ./enum.VarianceBias.html

(arr: &Array<T>, bias_kind: VarianceBias, dim: i64)

Source from the content-addressed store, hash-verified

175///
176/// [1]: ./enum.VarianceBias.html
177pub fn var_v2<T>(arr: &Array<T>, bias_kind: VarianceBias, dim: i64) -> Array<T::MeanOutType>
178where
179 T: HasAfEnum,
180 T::MeanOutType: HasAfEnum,
181{
182 unsafe {
183 let mut temp: af_array = std::ptr::null_mut();
184 let err_val = af_var_v2(
185 &mut temp as *mut af_array,
186 arr.get(),
187 bias_kind as c_uint,
188 dim,
189 );
190 HANDLE_ERROR(AfError::from(err_val));
191 temp.into()
192 }
193}
194
195/// Compute Variance along a specific dimension
196///

Callers 1

varFunction · 0.85

Calls 3

HANDLE_ERRORFunction · 0.85
intoMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected