'For each row in the input, compute a mask of all values falling between
the given percentiles.'

def _compute(self, arrays, dates, assets, mask):

    data = arrays[0].copy().astype(float64)
    data[(~ mask)] = nan
    lower_bounds = nanpercentile(data, self._min_percentile, axis=1, keepdims=True)
    upper_bounds = nanpercentile(data, self._max_percentile, axis=1, keepdims=True)
    return ((lower_bounds <= data) & (data <= upper_bounds))
