Hah, nice complex values, so I think I would just check for `op is np.arg(min|max)` (that way special casing the scalar too gets easier). The scalar type oddity is there for all `nan*` funcs with complex (but more weird for the arg ones). How about 1. raising a future warning to convert that `np.nan` to an error for the argmin/max, and otherwise using `np.float_(np.nan).astype(res.dtype)`. 2. use `copyto` with `casting=same_kind` (or you would have to use the shortest available `nan`, etc...)