Skip to content

ENH: implement edge and wrap modes for pad#857

Draft
iamdhrv wants to merge 1 commit into
data-apis:mainfrom
iamdhrv:agent/pad-edge-wrap-modes
Draft

ENH: implement edge and wrap modes for pad#857
iamdhrv wants to merge 1 commit into
data-apis:mainfrom
iamdhrv:agent/pad-edge-wrap-modes

Conversation

@iamdhrv

@iamdhrv iamdhrv commented Jul 15, 2026

Copy link
Copy Markdown

Closes #811

Summary

  • Add array-API-compatible implementations for pad(..., mode="edge") and pad(..., mode="wrap").
  • Keep the implementation backend-agnostic and preserve the existing constant-mode behavior.
  • Extend delegated backend handling and add NumPy-oracle coverage for multidimensional, asymmetric, zero-width, singleton, and large padding cases.

Validation

  • Test suite: 70 passed, 84 skipped for unavailable optional backends
  • NumPy oracle comparisons passed
  • Ruff passed
  • mypy passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: pad: implement "edge" and "wrap" modes

1 participant