Numpy Replace Inf With Nan Images