Skip to content

Shape Mismatch in linspace Function Between numpy and dpnp #2084

Open
@vtavana

Description

@vtavana

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions