Split a sequence into subsequences based on value.
Given a sequence of values and a sequence of values representing the division between bins, return the indices grouped by bin.
Parameters: | array : array_like
bins : array_like
|
---|---|
Returns: | out : list
|
Examples
>>> import spacepy.toolbox as tb
>>> tb.arraybin(range(10), [4.2])
[[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]