Skip to content

Commit 42d7092

Browse files
committed
Change after 1st review
1 parent 5ce8a29 commit 42d7092

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

doc/source/whatsnew/v0.25.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Other Enhancements
133133
- :meth:`DataFrame.describe` now formats integer percentiles without decimal point (:issue:`26660`)
134134
- Added support for reading SPSS .sav files using :func:`read_spss` (:issue:`26537`)
135135
- Added new option ``plotting.backend`` to be able to select a plotting backend different than the existing ``matplotlib`` one. Use ``pandas.set_option('plotting.backend', '<backend-module>')`` where ``<backend-module`` is a library implementing the pandas plotting API (:issue:`14130`)
136-
- :meth:`nargsort` handles ``ExtensionArray`` with its ``_values_for_argsort`` method (:issue:`25439`)
136+
- :meth:`nargsort` handles ``ExtensionArray`` without calling ``np.asanyarray`` (:issue:`25439`)
137137

138138
.. _whatsnew_0250.api_breaking:
139139

pandas/tests/extension/base/methods.py

+3-2
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

+1-2
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)