ClikaRT::ops::round
function
round()
Elementwise rounding to decimals fractional digits.
decimals = 0 (default) rounds to integers; positive keeps that many fractional digits; negative rounds to tens, hundreds, ….
Parameters
x: the input tensor.decimals: how many fractional digits to keep. Default0.
Throws
ClikaRT::Error: when the input's dtype is not served for this operation (the machine-readable reason ridescode_name()).
Returns: a new tensor, same shape and dtype as x.
auto y = ClikaRT::ops::round(x); // integers
auto c = ClikaRT::ops::round(x, 2); // cents
Declared in ClikaRT/compute/ops.h, line 5121