mvpa2.datasets.eventrelated.value2idx

mvpa2.datasets.eventrelated.value2idx(val, x, solv='round')

Convert a value into an index of the closes matching array element.

Parameters:

val : scalar

Value that is to be converted.

x : array or sequence

One-dimensional array whose elements are used for comparision.

solv : {‘round’, ‘floor’, ‘ceil’}

Resolver strategie: absolute closest element (round), closest smaller element (floor), or closest larger element (ceil).

Returns:

int