def asof_locs(self, where, mask):
locs = self.values[mask].searchsorted(where.values, side='<STR_LIT:right>')<EOL>locs = np.where(locs > <NUM_LIT:0>, locs - <NUM_LIT:1>, <NUM_LIT:0>)<EOL>result = np.arange(len(self))[mask].take(locs)<EOL>first = mask.argmax()<EOL>result[(locs == <NUM_LIT:0>) & (where.values < self.values[first])] = -<NUM_LIT:1><EOL>return result<EOL>
Find the locations (indices) of the labels from the index for
every entry in the `where` argument.

As in the `asof` function, if the label (a particular entry in
`where`) is not in the index, the latest index label upto the
passed label is chosen and its index returned.

If all of the labels in the index are later than a label in `where`,
-1 is returned.

`mask` is used to ignore NA values in the index during calculation.

Parameters
----------
where : Index
    An Index consisting of an array of timestamps.
mask : array-like
    Array of booleans denoting where values in the original
    data are not NA.

Returns
-------
numpy.ndarray
    An array of locations (indices) of the labels from the Index
    which correspond to the return values of the `asof` function
    for every element in `where`.