Skip to content

Commit fa5b90a

Browse files
authored
TST: change np.fix test to np.trunc (#63107)
1 parent 736702a commit fa5b90a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pandas/tests/series/test_ufunc.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,12 @@ def add3(x, y, z):
457457
ufunc(ser, ser, df)
458458

459459

460-
@pytest.mark.xfail(reason="see https://github.com/pandas-dev/pandas/pull/51082")
461-
def test_np_fix():
462-
# np.fix is not a ufunc but is composed of several ufunc calls under the hood
463-
# with `out` and `where` keywords
460+
def test_np_trunc():
461+
# This used to test np.fix, which is not a ufunc but is composed of
462+
# several ufunc calls under the hood with `out` and `where` keywords. But numpy
463+
# is deprecating that (or at least discussing deprecating) in favor of np.trunc,
464+
# which _is_ a ufunc without the out keyword usage.
464465
ser = pd.Series([-1.5, -0.5, 0.5, 1.5])
465-
result = np.fix(ser)
466+
result = np.trunc(ser)
466467
expected = pd.Series([-1.0, -0.0, 0.0, 1.0])
467468
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)