Function autograd::ops::div[][src]

pub fn div<A: AsRef<Tensor>, B: AsRef<Tensor>>(a: A, b: B) -> Tensor

Division.

/ operator can be used instead.

extern crate ndarray;
extern crate autograd as ag;

let ref a = ag::ones(&[2]);
let ref b = ag::ones(&[2]);
let ref z: ag::Tensor = a / b;
assert_eq!(z.eval(&[]), Some(ndarray::arr1(&[1., 1.]).into_dyn()));