curvefit.core.utils.sizes_to_indices
Converting sizes to corresponding indices.
Syntax
indices = curvefit.sizes_to_indices(sizes)
Arguments
sizes (iterable)
: The argument sizes is an iterable object with integer values. The i-th value insizes[i]
is the number of elements in the i-th subvector of a larger total vector that contains the subvectors in order.
Returns
indices
: The return value indices is alist
of one dimensional numpy arrays. The valueindices[i]
has length equal to the i-th size. It starts (ends) with the index in the total vector of the first (last) element of the i-th subvector. The elements ofindices[i]
are monotone and increase by one between elements.