array_select

File Purpose: select part of a list-like object based on values.

E.g. index of “closest” value, list of all values greater than some reference value.

Functions

select_after(listlike, x)

returns the value closest to x, but not smallerthan x.

select_all_after(listlike, x)

returns listlike, sliced starting from the value closest to x, but not smaller than x.

select_all_before(listlike, x)

returns listlike, sliced until the value closest to x, but not larger than x.

select_before(listlike, x)

returns the value closest to x, but not larger than x.

select_between(listlike, x1, x2)

returns the list of values with x1 <= value <= x2.

select_closest(listlike, x[, force_relative])

returns the value closest to x.

select_i_after(listlike, x)

returns the index of the value closest to x, but not smaller than x.

select_i_before(listlike, x)

returns the index of the value closest to x, but not larger than x.

select_i_between(listlike, x1, x2)

returns the list of indices for all values x1 <= value <= x2.

select_i_closest(listlike, x[, force_relative])

returns the index of the value closest to x.

Classes

ArraySelectable()

class which adds select_.

ArraySelectableChildHaver()

class which provides select_.