scipp.round

scipp.round(x, *, out=None)

Round to the nearest integer if all values passed in x.

Note: if the number being rounded is halfway between two integers it will round to the nearest even number. For example 1.5 and 2.5 will both round to 2.0, -0.5 and 0.5 will both round to 0.0.

Parameters
  • x (VariableLike) – Input data.

  • out (Optional[VariableLike]) – Optional output buffer.

Returns

Rounded version of the data passed to the nearest integer.

Return type

VariableLike