unytics/bigfunctions

[new]: `quantize_into_fixed_width_bins(value, min_value, max_value, nb_bins)`

unytics opened this issue · 1 comments

Check the idea has not already been suggested

Edit the title above with self-explanatory function name and argument names

  • The function name and the argument names I entered in the title above seems self explanatory to me.

BigFunction Description as it would appear in the documentation

Quantize value into a bin.

Examples of (arguments, expected output) as they would appear in the documentation

quantize_into_fixed_width_bins(-4, 0, 100, 10)
--> ]-∞, 0[

quantize_into_fixed_width_bins(5, 0, 100, 10)
--> [0, 10[

quantize_into_fixed_width_bins(97, 0, 100, 10)
--> [90, 100]

quantize_into_fixed_width_bins(123, 0, 100, 10)
--> [100, + ∞[