|
11 | 11 |
|
12 | 12 | import numpy as np |
13 | 13 |
|
14 | | -from pandas._config import get_option |
| 14 | +from pandas._config import using_pdep16_nan_behavior |
15 | 15 |
|
16 | 16 | from pandas._libs import ( |
17 | 17 | lib, |
@@ -310,7 +310,7 @@ def __setitem__(self, key, value) -> None: |
310 | 310 | def __contains__(self, key) -> bool: |
311 | 311 | if isna(key) and key is not self.dtype.na_value: |
312 | 312 | # GH#52840 |
313 | | - if lib.is_float(key) and get_option("mode.PDEP16_nan_behavior"): |
| 313 | + if lib.is_float(key) and using_pdep16_nan_behavior(): |
314 | 314 | key = self.dtype.na_value |
315 | 315 | elif self._data.dtype.kind == "f" and lib.is_float(key): |
316 | 316 | return bool((np.isnan(self._data) & ~self._mask).any()) |
@@ -659,7 +659,7 @@ def reconstruct(x: np.ndarray): |
659 | 659 | # reached in e.g. np.sqrt on BooleanArray |
660 | 660 | # we don't support float16 |
661 | 661 | x = x.astype(np.float32) |
662 | | - if get_option("mode.PDEP16_nan_behavior"): |
| 662 | + if using_pdep16_nan_behavior(): |
663 | 663 | m[np.isnan(x)] = True |
664 | 664 | return FloatingArray(x, m) |
665 | 665 | else: |
@@ -866,7 +866,7 @@ def _maybe_mask_result( |
866 | 866 | if result.dtype.kind == "f": |
867 | 867 | from pandas.core.arrays import FloatingArray |
868 | 868 |
|
869 | | - if get_option("mode.PDEP16_nan_behavior"): |
| 869 | + if using_pdep16_nan_behavior(): |
870 | 870 | mask[np.isnan(result)] = True |
871 | 871 |
|
872 | 872 | return FloatingArray(result, mask, copy=False) |
|
0 commit comments