1111# np.sign emits a warning with nans, <https://github.com/numpy/numpy/issues/15127>
1212@pytest .mark .filterwarnings ("ignore:invalid value encountered in sign:RuntimeWarning" )
1313def 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" )
1515 result = ufunc (a )
1616 expected = pd .array (ufunc (a .astype (float )), dtype = "Float64" )
1717 tm .assert_extension_array_equal (result , expected )
@@ -24,7 +24,7 @@ def test_ufuncs_single(ufunc):
2424
2525@pytest .mark .parametrize ("ufunc" , [np .log , np .exp , np .sin , np .cos , np .sqrt ])
2626def 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" )
2828 with np .errstate (invalid = "ignore" ):
2929 result = ufunc (a )
3030 expected = pd .array (ufunc (a .astype (float )), dtype = "Float64" )
@@ -40,7 +40,7 @@ def test_ufuncs_single_float(ufunc):
4040@pytest .mark .parametrize ("ufunc" , [np .add , np .subtract ])
4141def test_ufuncs_binary_float (ufunc ):
4242 # 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" )
4444 result = ufunc (a , a )
4545 expected = pd .array (ufunc (a .astype (float ), a .astype (float )), dtype = "Float64" )
4646 tm .assert_extension_array_equal (result , expected )
@@ -88,7 +88,7 @@ def test_ufunc_reduce_raises(values):
8888 ],
8989)
9090def 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" )
9292 pandasmeth = getattr (s , pandasmethname )
9393 result = pandasmeth (** kwargs )
9494 s2 = pd .Series (data = [0.1 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 ], dtype = "float64" )
0 commit comments