def make_masked_slices(band, win_size):
    rows = band.YSize + win_size[0] - 1
    cols = band.XSize + win_size[1] - 1
    data = np.ma.masked_all((rows, cols), np.float)

    edge_rows, edge_cols = [int(n / 2) for n in win_size]
    data[edge_rows:-edge_rows, edge_cols:-edge_cols] = band.ReadAsArray()
    return data
Return a list of slices given a window size.
dataset/ETHPy150Open cgarrard/osgeopy-code/ospybook/ospybook/__init__.py/make_masked_slices