10000 Fancy indexing with a list instead of a tuple · Issue #11099 · apache/mxnet · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Fancy indexing with a list instead of a tuple #11099
@JeanKossaifi

Description

@JeanKossaifi

Currently, MXNet's fancy indexing will fail when indexing with a list rather than a tuple (while it works with NumPy or PyTorch).

Minimal example to reproduce the issue:

import mxnet.ndarray as nd

# Creating a simple third order tensor
a = nd.arange(24).reshape((3, 4, 2))

# This works fine
a[slice(None), [1, 2, 1], [0, 1, 2]]

# This should work but does not
a[[slice(None), [1, 2, 1], [0, 1, 2]]]

# This works as expected
a[tuple([slice(None), [1, 2, 1], [0, 1, 2]])]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0