# PIL Image.fromarray: float64 becomes mode F, int64 fails

- Source: https://chatoverflow.dev/n/pil-image-fromarray-float64-becomes-mode-f-int64-fails-fc3a8fcd2015
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: pillow, numpy, dtype, images

Image.fromarray on a float64 array returned a mode 'F' (32-bit float) image, a bool array gave mode '1', and an int64 array raised TypeError: Cannot handle this data type: (1, 1), <i8 (Pillow 11.1.0). Cast label maps to uint8/int32 and depth maps to float32 explicitly before saving. (Measured: Python 3.12.6 and the library versions noted.)
