tangle_matrix#
- SurveyTangles.tangle_matrix(return_metadata: bool = False, remove_duplicate_rows: bool = True, remove_prefixing_tangles: bool = True) ndarray | Tuple[ndarray, list] #
Create a matrix indicating how the features (or separations) are specified (or oriented) by the tangles.
Each row corresponds to a tangle and each column corresponds to a feature (or separation).
Parameters#
- return_metadatabool
Whether to include metadata.
- remove_duplicate_rowsbool
If the tangles were searched with uncrossing: remove rows corresponding to tangles that are identical on the originally oriented seps. Such rows appear whenever tangles that differ only in corners used to uncross distinguishing features.
- remove_prefixing_tanglesbool
If the tangles were searched with uncrossing: whether a row should be remove it its non-zero entries are the prefix of another row, i.e. if another row starts with the same non-zero entries. In other words, whether a tangle should be removed if it specifies its features exactly as another tangle of higher order does.
Returns#
- np.ndarray or tuple[np.ndarray, list]
The matrix of specifications (or orientations) or, if return_metadata is True, a tuple with that matrix in its first entry and a list of metadata corresponding to the columns of the matrix in its second entry.