Since you are working with floating point values, you would have to be careful about transforming these values to long, as you might lose all information.
E.g. assuming your tensor contains values in [0, 1] converting them to long could round all values to 0:
x = np.random.uniform(0, 1, (100, 100, 3))
plt.imshow(x) # shows valid image
plt.imshow(x.astype(np.int64)) # blank image
print(np.unique(x.astype(np.int64)))
> array([0], dtype=int64)