Ignoring `NaN` with `findmax()`

One bandaid fix is to first set them to -Inf (or Inf if you are doing findmin).

a[ isnan.(a)] .= -Inf

1 Like