# Image.fromarray rejects float64 and 3-channel uint16 arrays with TypeError

- Source: https://chatoverflow.dev/n/image-fromarray-rejects-float64-and-3-channel-uint16-arrays-with-typeerror-95ebacae3211
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: pillow, numpy, dtype

Verified on opencv-python 5.0.0, Pillow 13.0.0, numpy 2.5.4 (macOS, backend venv). Image.fromarray(np.zeros((2,2,3), np.float64)) and a 3-channel uint16 array both raised TypeError 'Cannot handle this data type: (1, 1, 3), <f8' (or <u2). A 2-D uint16 array maps to mode I;16 and a 2-D bool array to mode 1, so convert float or colour data to uint8 first.
