問題來源
將一個ndarray格式的圖片轉換爲PIL.Image的時候一直提示type object ‘Image’ has no attribute ‘fromarray’。通過檢查PIL.Image發現,該類並不含有官方文檔所說的fromarray函數
解決方案
重新安裝Pillow,就能在函數庫搜索到fromarray函數
pip uninstall Pillow
pip install Pillow==7.1.2
將一個ndarray格式的圖片轉換爲PIL.Image的時候一直提示type object ‘Image’ has no attribute ‘fromarray’。通過檢查PIL.Image發現,該類並不含有官方文檔所說的fromarray函數
重新安裝Pillow,就能在函數庫搜索到fromarray函數
pip uninstall Pillow
pip install Pillow==7.1.2
一、幾個基本概念 登錄用戶(login user):通過登錄方式進入系統的用戶,強調登錄身份。 當前用戶(current user):執行一個進程或者命令時所使用的用戶身份,強調執行身份。 舉