def _check(arr): mask = -np.isfinite(arr) arr = arr.copy() result = lib.rank_1d_float64(arr) arr[mask] = np.inf exp = rankdata(arr) exp[mask] = nan assert_almost_equal(result, exp)
def _check(arr): mask = -np.isfinite(arr) arr = arr.copy() result = algos.rank_1d_float64(arr) arr[mask] = np.inf exp = rankdata(arr) exp[mask] = nan assert_almost_equal(result, exp)