Good idea, and it works like a charm. Doing the float->uint8->float32 conversion also simplifies your other suggestion down to `data[data[:,:,3]==0] = 0`, if `data` has already done the round trip.