data_base
❭ db_initializers
❭ prepare_ANN_batches
❭ get_bin
get_bin¶
-
data_base.db_initializers.prepare_ANN_batches.get_bin(value, bin_min, bin_max, n_bins, tolerance=
0.1
)¶ Find the bin index of a given value.
- Parameters:¶
value (float) – The value to find the bin for.
bin_min (float) – Start of the first bin.
bin_max (float) – End of the last bin.
n_bins (int) – The number of bins.
tolerance (float, optional) – The tolerance for the outer ibn edges (for rounding errors). Defaults to 0.1.
- Returns:¶
The bin the value belongs to.
- Return type:¶
int