def reshape_and_scale(x, img_shape=((- 1), dim, 1)):
    return x.reshape(img_shape).astype(np.float32)
def reshape_and_scale(x, img_shape=((- 1), dim, 1)):
    return x.reshape(img_shape).astype(np.float32)