Skip to content

dpctl.tensor.put returns incorrect result  #1360

Description

@vlad-perevezentsev

The code below works incorrectly in dpctl when dpctl.tensor.put needs to rewrite the duplicate index of an element with a different value

import dpctl.tensor as dpt
x = dpt.ones((5,))
ind = dpt.asarray([0, 0])
dpt.put(x, ind, [10, 20])
x
> usm_ndarray([10., 1., 1., 1., 1.])
import numpy
a = numpy.ones((5,))
numpy.put(a, [0, 0], [10, 20])
a
> array([20., 1., 1., 1., 1.])

Metadata

Metadata

Assignees

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