pyspark.mllib.linalg.
DenseMatrix
Column-major dense matrix.
Methods
asML()
asML
Convert this matrix to the new mllib-local representation.
toArray()
toArray
Return an numpy.ndarray
toSparse()
toSparse
Convert to SparseMatrix
Methods Documentation
Convert this matrix to the new mllib-local representation. This does NOT copy the data; it copies references.
New in version 2.0.0.
pyspark.ml.linalg.DenseMatrix
Examples
>>> m = DenseMatrix(2, 2, range(4)) >>> m.toArray() array([[ 0., 2.], [ 1., 3.]])