Skip to content

repeat with axis=None repeats flattened array - #1427

Merged
ndgrigorian merged 3 commits into
masterfrom
repeat-flattened-array
Oct 4, 2023
Merged

repeat with axis=None repeats flattened array#1427
ndgrigorian merged 3 commits into
masterfrom
repeat-flattened-array

Conversation

@ndgrigorian

Copy link
Copy Markdown
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
Copy Markdown

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

@ndgrigorianndgrigorian changed the title Implements flat overload for repeatrepeat axis=None repeats flattened arrayOct 2, 2023
@ndgrigorianndgrigorian changed the title repeat axis=None repeats flattened arrayrepeat with axis=None repeats flattened arrayOct 2, 2023
@oleksandr-pavlyk

Copy link
Copy Markdown
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
Copy Markdown

@github-actions

Copy link
Copy Markdown

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

@coveralls

Copy link
Copy Markdown
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
Copy Markdown

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

@oleksandr-pavlykoleksandr-pavlyk 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.

LGTM! Thank you @ndgrigorian

@ndgrigorian
ndgrigorian merged commit dfba436 into masterOct 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 freeto 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

@ndgrigorian@oleksandr-pavlyk@coveralls