API: Handle pow & rpow special cases by TomAugspurger · Pull Request #30097 · pandas-dev/pandas (original) (raw)
General question - is this behavior defined or standardized somewhere?
It's part of some IEEE spec, but I haven't tracked down the source. Both Python and NumPy use this behavior for NaN.
For NA, I think it aligns with the principles behind Kleene logic. True | NA is True, since True | anything is True. Similarly, NA ** 0 is 1, since anything ** 0 is 1.