def generate_inpaint_mask(n_samples, n_colors, spatial_width):
    """
    The mask will be True where we keep the true image, and False where we're
    inpainting.
    """
    mask = np.zeros((n_samples, n_colors, spatial_width, spatial_width), dtype=bool)
    # simple mask -- just mask out half the image
    mask[:,:,:,2/spatial_width:] = True
    return mask.ravel()
dataset/ETHPy150Open Sohl-Dickstein/Diffusion-Probabilistic-Models/sampler.py/generate_inpaint_mask/swapped operands of `/`