Skip to content

repartition unexpected behaviour #200

@VictorVanthilt

Description

@VictorVanthilt

Im using a lot of permute calls where all of the indices are in order, for example:

T = zeros(Int, (ℂ^1 ^2)  (ℂ^3 ^4 ^5 ^6))

space(permute(T,  ((1, 2, 3), (4, 5, 6)))) -> (ℂ^1 ^2  (ℂ^3)')  (ℂ^4 ^5 ^6)

When I found out about the repartition command I thought this was the perfect match for my overly long permute calls.
However, when I try to use it in the way I understood from the docstring, I get a totally different result:

space(repartition(T, 3, 3))) -> (ℂ^1 ^2  (ℂ^6)')  (ℂ^3 ^4 ^5)

are (ℂ^1 ⊗ ℂ^2 ⊗ (ℂ^6)') really the "first 3 spaces" of T? Lets check using space

space(T, 1), space(T, 2), space(T, 3) ->^1, ℂ^2, ℂ^3'

What is the intended behaviour and is there value in adding a repartition_inds that respects space's convention about the ordering of the spaces?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions