def _zero_pad(array, amount, axes=(1, 2)):
    if amount == 0:
        return array
    new_shape = []
    slices = []
    for i, s in enumerate(array.shape):
        if i in axes:
            new_shape.append(s + 2 * amount)
            slices.append(slice(amount, -amount))
        else:
            new_shape.append(s)
            slices.append(slice(None))
    new_shape = tuple(new_shape)
    slices = tuple(slices)
    new_array = numpy.zeros(new_shape, dtype=array.dtype)
    new_array[slices] = array
    return new_array
Returns location of db.table (or db.table.partition). partition is a dict of partition key to
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/train_extensions/window_flip.py/_zero_pad--crossover with--dataset/ETHPy150Open spotify/luigi/luigi/contrib/hive.py/HiveClient.table_location