with_sparse_array#
- classmethod AdvancedFeatureSystem.with_sparse_array(seps, return_sep_info: bool = False, metadata=None) tuple[SetSeparationSystemBase, tuple[ndarray, ndarray]] | SetSeparationSystemBase #
Create a new SetSeparationSystem from a sparse separation matrix.
Parameters#
- sepsscipy.sparse.csc_matrix
Sparse matrix of shape (number of points, number of separations) representing the separations.
- return_sep_infobool, optional
Whether to return the ids and orientations of the incoming separations as they will appear in the separation system.
- metadataarraylike, optional
An optional piece of metadata. Should be an arraylike of length (number of separations).
Returns#
- SetSeparationSystem or tuple (SetSeparationSystem, np.ndarray)
The generated set separation system or, if return_sep_info is set to True, a tuple additionally containing information about the ids and orientations of the input separations.