Writing partition labels to state object
Dear all, Given a NestedBlockState object called state, I can obtain the list of nested group belongings by x = state.get_bs() I can then order the partitions by y = order_nested_partition_labels(x) Is there a way to store the ordered labels in the original NestedBlockState object? How do I have to write that? Many thanks Haiko
Am 24.08.21 um 18:01 schrieb Lietz, Haiko:
Dear all,
Given a NestedBlockState object called state, I can obtain the list of nested group belongings by
x = state.get_bs()
I can then order the partitions by
y = order_nested_partition_labels(x)
Is there a way to store the ordered labels in the original NestedBlockState object? How do I have to write that?
Just create a new NestedBlockState (or, equivalently, copy the from the old one): state = NestedBlockState(g, bs=y) or state = state.copy(bs=y) Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
Lietz, Haiko -
Tiago de Paula Peixoto