Skip to content

repeat with axis=None repeats flattened array #1427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

ndgrigorian
Copy link
Collaborator

This PR permits axis=None for any input to repeat.

To do so, the previously implemented kernels for repeat were tweaked to permit this behavior, and overloads of py_repeat_by_sequence and py_repeat_by_scalar without axis arguments were implemented. These share an overloaded Python binding, with and without an axis argument.

  • 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?
  • If this PR is a work in progress, are you opening the PR as a draft?

Adds tests for new functionality
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_2 ran successfully.
Passed: 916
Failed: 84
Skipped: 119

@ndgrigorian ndgrigorian changed the title Implements flat overload for repeat repeat axis=None repeats flattened array Oct 2, 2023
@ndgrigorian ndgrigorian changed the title repeat axis=None repeats flattened array repeat with axis=None repeats flattened array Oct 2, 2023
@oleksandr-pavlyk
Copy link
Contributor

Docstring pertaining to description of axis needs updating.

Docstring has been adjusted to reflect changes to `axis` as well as new `repeats` types

Corrected a bug in the behavior of `repeat` for size 1 `repeats` Python sequences
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_3 ran successfully.
Passed: 915
Failed: 85
Skipped: 119

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 85.807% (+0.03%) from 85.777% when pulling c19c9b4 on repeat-flattened-array into caa0939 on master.

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_4 ran successfully.
Passed: 916
Failed: 84
Skipped: 119

Copy link
Contributor

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you @ndgrigorian

@ndgrigorian ndgrigorian merged commit dfba436 into master Oct 4, 2023
ndgrigorian added a commit that referenced this pull request Oct 9, 2023
Caused by a typo in the Python binding changes made in #1427

Added a test for correct behavior
ndgrigorian added a commit that referenced this pull request Oct 9, 2023
Caused by a typo in the Python binding changes made in #1427

Added a test for correct behavior
@ndgrigorian ndgrigorian deleted the repeat-flattened-array branch November 28, 2023 18:03
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.

3 participants