Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

dpctl.tensor.put returns incorrect result  #1360

Copy link
Copy link
@vlad-perevezentsev

Description

@vlad-perevezentsev
Issue body actions

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.])

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.