Handling underlying exceptions in ExtensionArrayOpsMixin #22944
Labels
Dtype Conversions
Unexpected or buggy dtype conversions
ExtensionArray
Extending pandas with custom dtypes or arrays.
Numeric Operations
Arithmetic, Comparison, and Logical operations
I'm growing to dislike the try / except to wrap the results of a binop. That's what hid #22930.
I wonder, is it possible for EA authors to annotate which ops form an algebra for their Extension type, so that we can know ahead of time whether the result should be wrappe? Something like
and if the op name is in those, then we attempt to wrap the result, but don't catch any errors? If the op name isn't in those then we return an ndarray?
The thing that would ruin this is if there were legitimate cases where whether or not the result can be wrapped depends on the value, rather than the type. Can we think of any of those?
cc @Dr-Irv
The text was updated successfully, but these errors were encountered: