Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
BUG: Consistent division by zero behavior for Index/Series #27321
We have two very-similar functions for masking division by zero for Index vs Series. The Index version is the more correct of the two, so I'm trying to make the Series one behave more like the Index one, eventually just using the Index one for both.
The hard part here is that IntegerArray, SparseArray, and SparseSeries have their own arithmetic implementations, and we test that they behave the same as Series. Several attempts to patch these implementations have failed (and motivated #27302, which this is rebased on top of), so for now this PR patches the tests instead of the implementations.
I think the IntegerArray implementation should be relatively easy to patch. SparseArray I'll need some help (cc @TomAugspurger) with