shifts.list_to_vector function

Compute the vector of shifts.