Skip to content

REF/CLN: ops boilerplate #23853

Open
Open
@jbrockmendel

Description

@jbrockmendel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CleanInternalsRelated to non-user accessible pandas implementationNumeric OperationsArithmetic, Comparison, and Logical operationsRefactorInternal refactoring of code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions