Skip to content

Commit ed4db14

Browse files
committed
update test
1 parent c404086 commit ed4db14

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/tests/frame/methods/test_to_numpy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ def test_to_numpy_datetime_with_na(self):
5050
df = DataFrame(dti)
5151
df.iloc[0, 0] = NaT
5252
expected = np.array([[np.nan], [1.45169280e18], [1.45177920e18]])
53-
assert np.allclose(
54-
df.to_numpy(float, na_value=np.nan), expected, equal_nan=True
55-
)
53+
result = df.to_numpy(float, na_value=np.nan)
54+
tm.assert_numpy_array_equal(result, expected)
5655

5756
df = DataFrame(
5857
{
@@ -69,11 +68,12 @@ def test_to_numpy_datetime_with_na(self):
6968
],
7069
}
7170
)
72-
arr = np.array(
71+
expected = np.array(
7372
[
7473
[0.00e00, 0.00e00, 1.00e00],
7574
[8.64e04, np.nan, np.nan],
7675
[np.nan, 8.64e04, 2.00e00],
7776
]
7877
)
79-
assert np.allclose(df.to_numpy(float, na_value=np.nan), arr, equal_nan=True)
78+
result = df.to_numpy(float, na_value=np.nan)
79+
tm.assert_numpy_array_equal(result, expected)

0 commit comments

Comments
 (0)