Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
294 B
2
Indexable
Never
def transform_image(img):
    s = (img.sum(axis=0)[::-1]>0).tolist()

    if True in s:
        ss = s.index(True)

    z = np.zeros(a.shape)
    z[:,ss:] += img[:,:-ss]
    
    aa=img+np.random.normal(0,0.05,img.reshape(-1).shape[0]).reshape(img.shape)

    return img.T[::-1],img[::-1,],z,aa
Leave a Comment