Skip to content

dpt.sum over axis for transposed input array #1391

Description

@antonwolfy

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

importnumpy, dpctl, dpctl.tensorasdptfrommathimportprodsh= (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.TbT.shape# Out: (3, 2, 1)bT.sum(axis=2)
# Out:# array([[0, 3],# [1, 4],# [2, 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