Hi,
The issue is that numpy image is a byte/uint8 array and that is why there is conversion to ByteTensor in the source code I referenced.
The way you initialized your array, it’s int64 dtype which is not image in the definitions of numpy or PIL.
To get desired result, you can convert a using a = a.astype(np.uint8).
Bests