-
graphicle.data.MaskGroup.flatten(how: 'rise' | 'agg' | 'leaves' =
'rise') MaskGroup[MaskArray][source] Removes nesting such that the
MaskGroupcontains onlyMaskArrayinstances, and no otherMaskGroup.New in version 0.1.11.
Changed in version 0.2.6: Added
howparameter.Changed in version 0.3.7: Added
leavesoption forhowparameter.- Parameters:¶
- how : {'rise', 'agg', 'leaves'}¶
Method used to convert into flat
MaskGroup.riserecurses through nested levels, raising all containedMaskArrayinstances to the top level.aggloops over the top level ofMaskBaseobjects, leaving top-levelMaskArrayobjects as-is, but calling the aggregation operation over anyMaskGroup.leavesbrings the innermosted nestedMaskArrayinstances to the top level, discarding the rest. Default isrise.
- Returns:¶
flat_masks – Flat
MaskGroupwith onlyMaskArrayinstances nested at the top level.- Return type:¶
Last update:
Jun 27, 2025