Skip to content

Add implementation of dpnp.lib.stride_tricks.as_strided#2991

Merged
antonwolfy merged 10 commits into
masterfrom
impl-lib.as_strided
Jul 16, 2026
Merged

Add implementation of dpnp.lib.stride_tricks.as_strided#2991
antonwolfy merged 10 commits into
masterfrom
impl-lib.as_strided

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

This PR adds a new dpnp.lib namespace and implements dpnp.lib.stride_tricks.as_strided.
The function creates a view into an array with a caller-specified shape and strides, sharing the base array's memory.

It closes #2969.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@antonwolfy antonwolfy added this to the 0.21.0 release milestone Jul 3, 2026
@antonwolfy antonwolfy self-assigned this Jul 3, 2026
@antonwolfy
antonwolfy force-pushed the impl-lib.as_strided branch from 3b47991 to 4b62bf8 Compare July 3, 2026 12:27
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@coveralls

coveralls commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage is 78.12%impl-lib.as_strided into master. No base build found for master.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev3=py313h509198e_13 ran successfully.
Passed: 1373
Failed: 2
Skipped: 5

@antonwolfy
antonwolfy marked this pull request as ready for review July 6, 2026 12:02
Comment thread dpnp/lib/stride_tricks.py
Comment thread dpnp/lib/stride_tricks.py
Comment thread dpnp/lib/stride_tricks.py
Comment thread dpnp/__init__.py
Comment thread dpnp/tests/test_stride_tricks.py
@vlad-perevezentsev
vlad-perevezentsev self-requested a review July 15, 2026 13:48

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more comments from my side
LGTM
Thank you @antonwolfy

@antonwolfy
antonwolfy merged commit a41fd86 into master Jul 16, 2026
75 of 82 checks passed
@antonwolfy
antonwolfy deleted the impl-lib.as_strided branch July 16, 2026 07:57
github-actions Bot added a commit that referenced this pull request Jul 16, 2026
This PR adds a new `dpnp.lib` namespace and implements
`dpnp.lib.stride_tricks.as_strided`.
The function creates a view into an array with a caller-specified shape
and strides, sharing the base array's memory.

It closes #2969. a41fd86
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.

dpnp.lib.stride_tricks.as_strided mentioned in documentation but not implemented

3 participants