Skip to content

Commit bc51b2f

Browse files
authored
ENH: Remove NINF and PINF usages (#54468)
ENH: Remove NINF usages
1 parent c1e309b commit bc51b2f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pandas/_libs/window/aggregations.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ cdef extern from "pandas/skiplist.h":
5151
int skiplist_min_rank(skiplist_t*, double) nogil
5252

5353
cdef:
54-
float32_t MINfloat32 = np.NINF
55-
float64_t MINfloat64 = np.NINF
54+
float32_t MINfloat32 = -np.inf
55+
float64_t MINfloat64 = -np.inf
5656

5757
float32_t MAXfloat32 = np.inf
5858
float64_t MAXfloat64 = np.inf

pandas/tests/dtypes/test_missing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ def test_empty_like(self):
805805
complex("inf"),
806806
complex("-inf"),
807807
np.inf,
808-
np.NINF,
808+
-np.inf,
809809
]
810810

811811
int_na_vals = [

pandas/tests/io/json/test_pandas.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def test_frame_read_json_dtype_missing_value(self, dtype):
393393

394394
tm.assert_frame_equal(result, expected)
395395

396-
@pytest.mark.parametrize("inf", [np.inf, np.NINF])
396+
@pytest.mark.parametrize("inf", [np.inf, -np.inf])
397397
@pytest.mark.parametrize("dtype", [True, False])
398398
def test_frame_infinity(self, inf, dtype):
399399
# infinities get mapped to nulls which get mapped to NaNs during

0 commit comments

Comments
 (0)