Round a value to n significant decimal places.
- Parameters:
-
- xscalar
The input data.
- nint_like
The number of significant decimal places to round to.
- Returns:
-
- (x_round, decimals)tuple[float, int]
x rounded to n significant decimal places and
the corresponding number of decimal places after the decimal point.
- Raises:
-
- TypeError
If x is not a scalar.