replace_nonfinite function

Replace non-finite values with other value (finite-OR-operator)