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

Shape Mismatch in linspace Function Between numpy and dpnp #2084

Open
vtavana opened this issue Oct 2, 2024 · 0 comments
Open

Shape Mismatch in linspace Function Between numpy and dpnp #2084

vtavana opened this issue Oct 2, 2024 · 0 comments

Comments

@vtavana
Copy link
Collaborator

vtavana commented Oct 2, 2024

There is a discrepancy in the output shape of the linspace function between numpy and dpnp.

Here is the code snippet to reproduce the issue:

import dpnp, numpy
numpy.linspace(0, [0, 1, 2, 3, 4], num=0, endpoint=False).shape
# (0, 5)

dpnp.linspace(0, [0, 1, 2, 3, 4], num=0, endpoint=False).shape
# (0,)

If endpoint=True , both functions return the same results.

import dpnp, numpy
numpy.linspace(0, [0, 1, 2, 3, 4], num=0, endpoint=True).shape
# (0, 5)

dpnp.linspace(0, [0, 1, 2, 3, 4], num=0, endpoint=True).shape
# (0, 5)
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

No branches or pull requests

1 participant