def blur(arr, tf): img = to_PIL(arr, tf) if tf: return img.filter(ImageFilter.BLUR) return to_theano(img.filter(ImageFilter.BLUR))