Can you sanitise the input and convert NaN to missing?  Or are there some NaNs that aren’t missing values?  Following what Matlab does because they can’t do better doesn’t seem a good argument.
              
              
              4 Likes