Skip to content

Commit

Permalink
CI: Backport changes to fix unreliable tests on ARM (#53849)
Browse files Browse the repository at this point in the history
  • Loading branch information
lithomas1 authored Jun 26, 2023
1 parent 5299051 commit d273ee0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pandas/tests/frame/indexing/test_setitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class mystring(str):
"dtype", ["int32", "int64", "uint32", "uint64", "float32", "float64"]
)
def test_setitem_dtype(self, dtype, float_frame):
arr = np.random.randn(len(float_frame))
arr = np.random.randint(1, 10, len(float_frame))

float_frame[dtype] = np.array(arr, dtype=dtype)
assert float_frame[dtype].dtype.name == dtype
Expand Down
7 changes: 6 additions & 1 deletion pandas/tests/series/methods/test_nlargest.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,12 @@ def test_nlargest_boolean(self, data, expected):
def test_nlargest_nullable(self, any_numeric_ea_dtype):
# GH#42816
dtype = any_numeric_ea_dtype
arr = np.random.randn(10).astype(dtype.lower(), copy=False)
if dtype.startswith("UInt"):
# Can't cast from negative float to uint on some platforms
arr = np.random.randint(1, 10, 10)
else:
arr = np.random.randn(10)
arr = arr.astype(dtype.lower(), copy=False)

ser = Series(arr.copy(), dtype=dtype)
ser[1] = pd.NA
Expand Down

0 comments on commit d273ee0

Please sign in to comment.