Function autograd::ops::ceil
[−]
[src]
pub fn ceil(a: &Tensor) -> Tensor
Returns the smallest integer greater than or equal to a number, element-wise.
extern crate ndarray; extern crate autograd as ag; let mut ctx = ag::Context::new(); let ref a = ag::constant(ndarray::arr1(&[-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]), &mut ctx); let ref b = ag::ceil(a); assert_eq!( b.eval(&mut ctx).as_slice().unwrap(), &[-1., -1., -0., 1., 2., 2., 2.] );