Skip to content
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

Implementation for dpnp.empty_like(), dpnp.zeros_like() and dpnp.ones_like() #928

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

chudur-budur
Copy link
Contributor

@chudur-budur chudur-budur commented Feb 24, 2023

  1. Implementation for overloading dpnp.empty_like(), dpnp.zeros_like() and dpnp.ones_like() type of functions.

  2. This also does code-reorganization in arrayobj.py

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

@chudur-budur chudur-budur force-pushed the dpnp/zero-one-empty-like branch from 1d979d2 to 0fcad68 Compare February 27, 2023 05:55
@chudur-budur chudur-budur marked this pull request as ready for review February 27, 2023 16:06
@chudur-budur chudur-budur force-pushed the dpnp/zero-one-empty-like branch from c180c8b to 65c949e Compare February 27, 2023 16:12
@chudur-budur chudur-budur changed the title WIP for dpnp.empty_like(), dpnp.zeros_like() and dpnp.ones_like() Implementation for dpnp.empty_like(), dpnp.zeros_like() and dpnp.ones_like() Feb 27, 2023
@chudur-budur chudur-budur force-pushed the dpnp/zero-one-empty-like branch 2 times, most recently from 51ecb8a to bae2a43 Compare February 27, 2023 17:08
@chudur-budur
Copy link
Contributor Author

Yea removed shape supports, it's good to go now. @diptorupd

@chudur-budur chudur-budur force-pushed the dpnp/zero-one-empty-like branch from bae2a43 to 973516a Compare February 28, 2023 01:13
dpnp.ones_like(). This follows numba's recipe, doesn't support
shape override.
@chudur-budur chudur-budur force-pushed the dpnp/zero-one-empty-like branch from 973516a to 64351f3 Compare February 28, 2023 01:16
@diptorupd
Copy link
Contributor

@chudur-budur Thanks!

It is interesting that we can create a dpnp array from these new constructors from a NumPy array. Does dpnp even support such a feature.

I am merging as is, we can revisit later if needed.

@diptorupd diptorupd merged commit 5d311b0 into IntelPython:main Feb 28, 2023
@diptorupd diptorupd deleted the dpnp/zero-one-empty-like branch February 28, 2023 02:50
github-actions bot added a commit that referenced this pull request Feb 28, 2023
Implementation for dpnp.empty_like(), dpnp.zeros_like() and dpnp.ones_like() 5d311b0
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.

2 participants