Image.fromarray()报错:TypeError: Cannot handle this data type: (1, 1, 3), <f4
当我们通过fromPILimportImage使用Image.fromarray()函数将numpy数组转成图片数据时,如果遇到以下错误:即:File"xxx.py",line310,inrerenderrendering_img1=Image.fromarray(rendering_img1)File"D:\Software\Anaconda\Anaconda\envs\Competition\