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

dpt.sum over axis for transposed input array #1391

Copy link
Copy link
@antonwolfy

Description

@antonwolfy
Issue body actions

Due to merging gh-1364 the below example has been broken:

import numpy, dpctl, dpctl.tensor as dpt
from math import prod

sh = (1, 2, 3)
a = dpt.arange(prod(sh), dtype='i4')
a = dpt.reshape(a, sh)
aT = dpt.permute_dims(a, (2, 1, 0))

aT.shape
# Out: (3, 2, 1)

dpt.sum(aT, axis=2)
# Out:
# usm_ndarray([[0, 1],
#              [2, 3],
#              [4, 5]])

b = numpy.arange(prod(sh), dtype='i4').reshape(sh)
bT = b.T

bT.shape
# Out: (3, 2, 1)

bT.sum(axis=2)
# Out:
# array([[0, 3],
#        [1, 4],
#        [2, 5]])
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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.