Casts input data to the nearest integer value, where the input
data is expected to be very close to the nearest integer.
- Parameters:
data (Union[float, ndarray]) – Data that is very close to the nearest integer value
dtype (Type) – Required integer datatype
- Return type:
Union[int, ndarray]
- Returns:
Rounded data value
- Raises:
ValueError – If rounding would significantly change the input value