Skip to content

lack of functionality in "unravel" function #1792

Open
@tort-dla-psa

Description

@tort-dla-psa

In numpy we have this:

>>>np.unravel_index(0, [1,32,32,1])
(0, 0, 0, 0)

>>>np.unravel_index([0,1,2], [1,32,32,1])
(array([0, 0, 0]), array([0, 0, 0]), array([0, 1, 2]), array([0, 0, 0]))

But in xtensor we can only use unravel with one index. Also we'll get by this not an xarray of
dimensions, but this:

"xt::get_strides_t<std::vector<int, std::allocator>>"

Why is it so?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions