Skip to content

Commit 0168aad

Browse files
committed
Change after 1st review
1 parent 63945bd commit 0168aad

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

doc/source/whatsnew/v0.25.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Other Enhancements
9999
- Error message for missing required imports now includes the original import error's text (:issue:`23868`)
100100
- :class:`DatetimeIndex` and :class:`TimedeltaIndex` now have a ``mean`` method (:issue:`24757`)
101101
- :meth:`DataFrame.describe` now formats integer percentiles without decimal point (:issue:`26660`)
102-
- :meth:`nargsort` handles ``ExtensionArray`` with its ``_values_for_argsort`` method (:issue:`25439`)
102+
- :meth:`nargsort` handles ``ExtensionArray`` without calling ``np.asanyarray`` (:issue:`25439`)
103103

104104
.. _whatsnew_0250.api_breaking:
105105

pandas/tests/extension/base/methods.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33

44
import pandas as pd
5+
from pandas.core.sorting import nargsort
56
import pandas.util.testing as tm
67

78
from .base import BaseExtensionTests
@@ -49,9 +50,9 @@ def test_argsort_missing(self, data_missing_for_sorting):
4950
('first', np.array([1, 2, 0]))
5051
])
5152
def test_nargsort(self, data_missing_for_sorting, na_position, expected):
52-
from pandas.core.sorting import nargsort
53+
# GH 25439
5354
result = nargsort(data_missing_for_sorting, na_position=na_position)
54-
tm.assert_numpy_array_equal(result, expected)
55+
tm.assert_numpy_array_equal(result, expected, check_dtype=False)
5556

5657
@pytest.mark.parametrize('ascending', [True, False])
5758
def test_sort_values(self, data_for_sorting, ascending):

pandas/tests/test_sorting.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
from numpy import nan
77
import pytest
88

9-
from pandas import (
10-
DataFrame, MultiIndex, Series, array, concat, merge, to_datetime)
9+
from pandas import DataFrame, MultiIndex, Series, array, concat, merge
1110
from pandas.core import common as com
1211
from pandas.core.sorting import (
1312
decons_group_index, get_group_index, is_int64_overflow_possible,

0 commit comments

Comments
 (0)