Error in SciPy. Misc. Toimage()
I have been troubled by this problem for a long time. In fact, I finally found that the toimage function has been cancelled, or there is no such function. There is a new function to replace it, that is image. Fromarray. The specific functions are as follows:
from PIL import Iamge
img = Image.fromarray(np.uint8(image_array)).covert('RGB')
img.save('dir')
note: NP. Uint8 () in the program is the image_Convert array to int type and implement the package that needs to install pilot
PIP install – I https://pypi.tuna.tsinghua.edu.cn/simple Pilot (mirror of Tsinghua source)
Similar Posts:
- Error in installing Python package — readtimeouterror
- Tensorflow Warning: cona The environment is inconsistent, please check the package plan carefully
- ImportError: cannot import name ‘_validate_lengths‘
- Image data type conversion uint8 and double in MATLAB
- Anaconda establishes a new environment, and condahttpererror: http 000 connection failed for URL… Solution process appears
- Solve the problem of HTTP 000 connection failed for URL in Anaconda
- CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.co
- Anaconda uses CONDA to connect to the network. Error: http 000 connection failed for URL
- Solve the problem of error reporting when installing Python Library in pycharm
- [Solved] Tensorflow TypeError: Fetch argument array has invalid type ‘numpy.ndarry’