aggregate.round_bucket()
Rounds a bucket size up to a “nice” value, as aggregate’s
Usage
aggregate.round_bucket(bs)round_bucket: {1, 2, 4, 5, 8} * 10**k at 1 and above, a power of two below.
Parameters
bs: float- Positive and finite.
Returns
float
Raises
ValueError-
If
bsis not positive and finite.
Examples
>>> from prospicio.aggregate import round_bucket
>>> round_bucket(3.4), round_bucket(0.3)(4.0, 0.5)