I convert 2d array(arr2d) to 3d array(arr3d) and save as image using below code. arr2d is float64 type.  Why save image is not color image?
arr3d[:, :, 0] = arr3d[:, :, 1] = arr3d[:, :, 2] = arr2d
arr3d=arr3d*255
im=Image.fromarray(np.maximum(np.minimum(arr3d, 255), 0).astype(np.uint8))
im.save(“sample.png”)