def _get_padded(data, start, end):
    if start < 0 and end > data.shape[0]:
        raise RuntimeError()
    if start < 0:
        start_zeros = np.zeros((-start, data.shape[1]),
                               dtype=data.dtype)
        return np.vstack((start_zeros, data[:end]))
    elif end > data.shape[0]:
        end_zeros = np.zeros((end - data.shape[0], data.shape[1]),
                             dtype=data.dtype)
        return np.vstack((data[start:], end_zeros))
    else:
        return data[start:end]
Connect to the device.
dataset/ETHPy150Open kwikteam/phy/phy/io/array.py/_get_padded--crossover with--dataset/ETHPy150Open google/openhtf/openhtf/plugs/usb/fastboot_device.py/FastbootDevice.Connect