ENH : bin_edeges helper function

Adds helper function + tests for generating bin edges from
any sub-set of the maximum, minimum, step, and number of bins.
Not really, the code path is already pretty complicated and the decisions about a default value of `nbins` should be made at a higher code level.