floor

ketos.utils.floor(a, decimals=0)[source]

This function adds the ability to floor to a decimal precision instead of to the nearest integer. Similar to np.round() precision argument.

Args:
a: array_like

Input data.

decimals: int

Number of decimal places to round to (default: 0).

Returns:
: array_like

The floor of a

Example:
>>> from ketos.utils import floor
>>> floor(13.84)
13.0
>>> floor(13.36)
13.0
>>> floor(13.36, decimals=1)
13.3
>>> floor(13.3669999, decimals=3)
13.366