SparseMatrix

class pyspark.ml.linalg.SparseMatrix(numRows: int, numCols: int, colPtrs: Union[bytes, Iterable[int]], rowIndices: Union[bytes, Iterable[int]], values: Union[bytes, Iterable[float]], isTransposed: bool = False)[source]

Sparse Matrix stored in CSC format.

Methods

toArray()

Return a numpy.ndarray

toDense()

Methods Documentation

toArray() → numpy.ndarray[source]

Return a numpy.ndarray

toDense()pyspark.ml.linalg.DenseMatrix[source]