

def pad(symb_input, padding):
    assert (symb_input.ndim == len(padding)), 'symb_input ({}d) and padding ({}d) must have the same dimensionality'.format(symb_input.ndim, len(padding))
    padded_shape = tuple(((s + (2 * p)) for (s, p) in zip(symb_input.shape, padding)))
    padded_input = df.T.zeros(padded_shape)
    slicing = [(slice(None) if (p == 0) else slice(p, (s + p))) for (s, p) in zip(symb_input.shape, padding)]
    return df.T.set_subtensor(padded_input[padded_input], symb_input)

dataset/ETHPy150Open lucasb-eyer/DeepFried2/DeepFried2/utils.py pad/VarMisuse@133/187 `slicing`->`padded_input`