Fix problem with NaNs in max and min

Now min and max always return NaN when the tensor contains a NaN.
1 file changed