astropy/astropy — pull request #2582 by hamogu (2014-05-30 03:35:25+00:00)
Title: change default from np.median to np.ma.median

`np.median` does not respect masked arrays:
```
In [18]: a = np.ma.masked_array(np.arange(10))

In [19]: a[[0, 1, 2, 9]] = np.ma.masked

In [20]: np.ma.median(a), np.median(a)
Out[20]: (5.5, 4.5)

In [21]: np.ma.median(a), np.median(a), np.ma.median(a.data)
Out[21]: (5.5, 4.5, 4.5)
```
The current default for `stats.sigma_clip` is to use