Skip to content

ENH: implement edge and wrap modes for pad - #857

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

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

@lucascolley lucascolley added the enhancement New feature or request label Jul 20, 2026
@iamdhrv
iamdhrv force-pushed the agent/pad-edge-wrap-modes branch from 1eaeb2a to 09e89bf Compare July 29, 2026 16:19
@iamdhrv
iamdhrv marked this pull request as ready for review July 29, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants