Skip to content

Commit 3a94c7f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into frame-rank-extension-array
2 parents 178f4e3 + 1af0a95 commit 3a94c7f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pandas/tests/copy_view/test_methods.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
)
1717
import pandas._testing as tm
1818
from pandas.tests.copy_view.util import get_array
19+
from pandas.util.version import Version
1920

2021

2122
def test_copy():
@@ -917,8 +918,9 @@ def test_round(decimals):
917918

918919
assert tm.shares_memory(get_array(df2, "b"), get_array(df, "b"))
919920
# TODO: Make inplace by using out parameter of ndarray.round?
920-
if decimals >= 0:
921+
if decimals >= 0 and Version(np.__version__) < Version("2.4.0.dev0"):
921922
# Ensure lazy copy if no-op
923+
# TODO: Cannot rely on Numpy returning view after version 2.3
922924
assert np.shares_memory(get_array(df2, "a"), get_array(df, "a"))
923925
else:
924926
assert not np.shares_memory(get_array(df2, "a"), get_array(df, "a"))

pandas/tests/extension/test_arrow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3333,9 +3333,9 @@ def test_factorize_chunked_dictionary():
33333333
)
33343334
ser = pd.Series(ArrowExtensionArray(pa_array))
33353335
res_indices, res_uniques = ser.factorize()
3336-
exp_indicies = np.array([0, 1], dtype=np.intp)
3336+
exp_indices = np.array([0, 1], dtype=np.intp)
33373337
exp_uniques = pd.Index(ArrowExtensionArray(pa_array.combine_chunks()))
3338-
tm.assert_numpy_array_equal(res_indices, exp_indicies)
3338+
tm.assert_numpy_array_equal(res_indices, exp_indices)
33393339
tm.assert_index_equal(res_uniques, exp_uniques)
33403340

33413341

0 commit comments

Comments
 (0)