Skip to main content

ensure_csc

Function ensure_csc 

Source
pub fn ensure_csc(
    data: CompressedSparseData2<f32>,
    verbosity: Verbosity,
) -> CompressedSparseData2<f32>
Expand description

Transpose sparse counts to CSC if they arrived as CSR.

nmf_process_sparse indexes indptr per column, so CSR input scales the wrong axis and returns quiet nonsense rather than an error. The R side always hands over CSR, so this is the common path, not the exception.

§Params

  • data - The counts, in either orientation.
  • verbosity - Resolved verbosity, used only for the transpose notice.

§Returns

The same data in CSC orientation.