A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://arrayfire.github.io/arrayfire-rust/arrayfire/fn.diff1.html below:

arrayfire::diff1 - Rust

[−][src]Function arrayfire::diff1
pub fn diff1<T>(input: &Array<T>, dim: i32) -> Array<T::InType> where
    T: HasAfEnum,
    T::InType: HasAfEnum

Calculate first order numerical difference along a given dimension

Result Array with first order difference values

use arrayfire::{Dim4, print, randu, diff1};
let dims = Dim4::new(&[5, 3, 1, 1]);
let a = randu::<f32>(dims);
print(&a);
let b = diff1(&a, 0);
print(&b);
let c = diff1(&a, 1);
print(&c);

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4