This is probably not the best option performance wise, consider the following:

```
In [14]: a = np.random.rand(1000)

In [15]: np.median(a)
Out[15]: 0.51385702922222753

In [16]: np.partition(a, (499, 500))[499:501].sum() / 2
Out[16]: 0.51385702922222753

In [17]: %timeit np.partition(a, (499, 500))[499:501].sum() / 2
10000 loops, best of 3: 21.9 µs per loop

In [18]: %timeit np.any(np.isnan(a))
100000 loops, best of 3: 14 µs per loop

In [19]: %timeit np.partition(a, (499, 500, -1))[499:501].sum() / 2
10000 loops, best of 3: 24.4 µs per loop
```

Calling `np.isnan` takes about 66% of the time to call `np.partition` on this array, a significant slowdown. If, on the other hand, you add `-1` to the list of indices to place in sorted position in the call to `np.partition`, as in line 19 above, the slowdown is much less noticeable, and because NAN is always placed at the end of an array when sorting, you can now check if there is a NAN in the array by checking if its last item after the call to partition is.

You may want to check for a wider variety of sizes of the input, to confirm if the advantage remains.