REF/CLN: ops boilerplate · Issue #23853 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
A ton of comparison and arithmetic operations do something combination of:
other = lib.item_from_zerodim(other)
- listlike but not arraylike --> wrap in ndarray
- return
NotImplemented
if operating against a senior class - raise
ValueError
if there is a length mismatch
But we don't always do all of these, and we definitely don't use+test error messages as consistent as @gfyoung would like.
This behavior could all be collected+standardized in a decorator