Bug: Unflatten reorders list WRONG!

Don’t know if this is new or just something I have missed before hopefully not the later. It seems if you shift a list with shift path (pshift) as shown then unflatten that list it does not return to the same order. Even though it should.

You can see that item 1 on the list is 4.22… when it should be 1.98…

I have made a workaround for now but this could become computational heavy fast with Partition List it seems and I feel this bug needs fixing.

File Here:
Shift Path & Unflattern Bug.gh (37.0 KB)

i have no idea what is this but i see that:

It needs to come via the shift path component as there is more code that goes in the gap between it and the unflatten component, but I removed it to simplify the problem as it was maths that was changing the values and need to show that it should return the same numbers and order as input.

Perhaps the Unflatten Tree seems to make the data tree structure identical in the given order regardless of the original order if the number of items is the same. Have no idea if this is a bug or not. This could be another workaround.

Shift Path & Unflattern Bug_re.gh (15.8 KB)

Nice other work around. Interesting unflatten does not work if the list and the guide tree do not have the same number of items.

It feels like an Oversight as much as it is a Bug as it gives no errors and if you don’t check the numbers or something else breaks because the output is mixed up I would have not spotted it.

Anything to add? Would be good to know how it’s calculating it and getting the “wrong” output.