Skip to content

Align signature of dpnp.astype with Python array API #2318

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 15 commits into from
Feb 20, 2025

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Feb 17, 2025

The PR is aimed to align signature of dpnp.astype function with Python array API where only x and dtype arguments are positional-only and other arguments are keyword-only.
Also docstrings of dpnp.astype function and dpnp.ndarray,astype method are aligned and properly updated. And dpnp.astype function is moved to array creation namespace like NumPy has it.

Additionally, docstring of device keyword is updated and aligned across all the functions description to have it described in a common way.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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 filing the PR as a draft?

Copy link
Contributor

github-actions bot commented Feb 17, 2025

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

Copy link
Contributor

github-actions bot commented Feb 17, 2025

Array API standard conformance tests for dpnp=0.17.0dev6=py312he4f9c94_36 ran successfully.
Passed: 1004
Failed: 0
Skipped: 10

@coveralls
Copy link
Collaborator

coveralls commented Feb 19, 2025

Coverage Status

coverage: 71.762% (-0.001%) from 71.763%
when pulling b7e2fe1 on align-astype-signature-with-array-api
into f56a43f on master.

Co-authored-by: Vahid Tavanashad <[email protected]>
Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev left a comment

Choose a reason for hiding this comment

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

Looks good
Thank you @antonwolfy !

@antonwolfy antonwolfy merged commit af0fc93 into master Feb 20, 2025
65 of 67 checks passed
@antonwolfy antonwolfy deleted the align-astype-signature-with-array-api branch February 20, 2025 10:20
github-actions bot added a commit that referenced this pull request Feb 20, 2025
The PR is aimed to align signature of `dpnp.astype` function with Python
array API where only `x` and `dtype` arguments are positional-only and
other arguments are keyword-only.
Also docstrings of `dpnp.astype` function and `dpnp.ndarray,astype`
method are aligned and properly updated. And `dpnp.astype` function is
moved to array creation namespace like NumPy has it.

Additionally, docstring of `device` keyword is updated and aligned
across all the functions description to have it described in a common
way. af0fc93
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.

4 participants