11
11
# np.sign emits a warning with nans, <https://github.com/numpy/numpy/issues/15127>
12
12
@pytest .mark .filterwarnings ("ignore:invalid value encountered in sign:RuntimeWarning" )
13
13
def test_ufuncs_single (ufunc ):
14
- a = pd .array ([1 , 2 , - 3 , np . nan ], dtype = "Float64" )
14
+ a = pd .array ([1 , 2 , - 3 , pd . NA ], dtype = "Float64" )
15
15
result = ufunc (a )
16
16
expected = pd .array (ufunc (a .astype (float )), dtype = "Float64" )
17
17
tm .assert_extension_array_equal (result , expected )
@@ -24,7 +24,7 @@ def test_ufuncs_single(ufunc):
24
24
25
25
@pytest .mark .parametrize ("ufunc" , [np .log , np .exp , np .sin , np .cos , np .sqrt ])
26
26
def test_ufuncs_single_float (ufunc ):
27
- a = pd .array ([1.0 , 0.2 , 3.0 , np . nan ], dtype = "Float64" )
27
+ a = pd .array ([1.0 , 0.2 , 3.0 , pd . NA ], dtype = "Float64" )
28
28
with np .errstate (invalid = "ignore" ):
29
29
result = ufunc (a )
30
30
expected = pd .array (ufunc (a .astype (float )), dtype = "Float64" )
@@ -40,7 +40,7 @@ def test_ufuncs_single_float(ufunc):
40
40
@pytest .mark .parametrize ("ufunc" , [np .add , np .subtract ])
41
41
def test_ufuncs_binary_float (ufunc ):
42
42
# two FloatingArrays
43
- a = pd .array ([1 , 0.2 , - 3 , np . nan ], dtype = "Float64" )
43
+ a = pd .array ([1 , 0.2 , - 3 , pd . NA ], dtype = "Float64" )
44
44
result = ufunc (a , a )
45
45
expected = pd .array (ufunc (a .astype (float ), a .astype (float )), dtype = "Float64" )
46
46
tm .assert_extension_array_equal (result , expected )
@@ -88,7 +88,7 @@ def test_ufunc_reduce_raises(values):
88
88
],
89
89
)
90
90
def test_stat_method (pandasmethname , kwargs ):
91
- s = pd .Series (data = [0.1 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 , np . nan , np . nan ], dtype = "Float64" )
91
+ s = pd .Series (data = [0.1 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 , pd . NA , pd . NA ], dtype = "Float64" )
92
92
pandasmeth = getattr (s , pandasmethname )
93
93
result = pandasmeth (** kwargs )
94
94
s2 = pd .Series (data = [0.1 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 ], dtype = "float64" )
0 commit comments