Skip to content

Commit fd53117

Browse files
Backport PR #55565 on branch 2.1.x (TST: Remove np.core usage) (#55567)
Backport PR #55565: TST: Remove np.core usage Co-authored-by: Matthew Roeschke <[email protected]>
1 parent c9053cc commit fd53117

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tests/frame/constructors/test_from_records.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ def test_from_records_with_datetimes(self):
4242
arrdata = [np.array([datetime(2005, 3, 1, 0, 0), None])]
4343
dtypes = [("EXPIRY", "<M8[ns]")]
4444

45-
recarray = np.core.records.fromarrays(arrdata, dtype=dtypes)
45+
recarray = np.rec.fromarrays(arrdata, dtype=dtypes)
4646

4747
result = DataFrame.from_records(recarray)
4848
tm.assert_frame_equal(result, expected)
4949

5050
# coercion should work too
5151
arrdata = [np.array([datetime(2005, 3, 1, 0, 0), None])]
5252
dtypes = [("EXPIRY", "<M8[m]")]
53-
recarray = np.core.records.fromarrays(arrdata, dtype=dtypes)
53+
recarray = np.rec.fromarrays(arrdata, dtype=dtypes)
5454
result = DataFrame.from_records(recarray)
5555
# we get the closest supported unit, "s"
5656
expected["EXPIRY"] = expected["EXPIRY"].astype("M8[s]")

0 commit comments

Comments
 (0)