Open vtavana opened 3 days ago
There is a discrepancy in the output shape of the linspace function between numpy and dpnp.
linspace
numpy
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.
endpoint=True
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)
There is a discrepancy in the output shape of the
linspace
function betweennumpy
anddpnp
.Here is the code snippet to reproduce the issue:
If
endpoint=True
, both functions return the same results.