ENH: added unit test for previous commit which updates median's handling
of nans in reference to ticket #586