Closed
Description
isna_new has a code path that handles EAs that isna_old doesnt, so the following will raise:
pd.set_option("mode.use_inf_as_na", True)
pd.isna(my_decimal_array)
Most of this can be fixed by adding to isna_ndarray_old:
if is_extension_array_dtype(values.dtype):
result = values.isna()
Then we can add into the interface tests:
def test_isna_old_extension_array(self, data_missing):
# TODO: do we need EA.isna to handle `inf`?
expected = data_missing.isna()
with cf.option_context("mode.use_inf_as_na", True):
result = pd.isna(data_missing)
tm.assert_equal(result, expected)
The two problems here are 1) as in the comment, this may be wrong/ambiguous if the EA has a concept of "inf" and 2) we still get a test failure on StringArray([<NA>, 'A'])