Noticed this also

    In [3]: np.float_(np.nan).astype(int)
    Out[3]: -9223372036854775808

    In [4]: np.float_(np.nan).astype(int8)
    Out[4]: 0

;) But I don't think that matters here. So you propose to keep the current behavior but add a future warning? My impression was that you wanted to raise an error. However, using a check for argmin|argmax looks like a good, explicit way to go that also clarifies exactly where the problem lies.