This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 048224c [SPARK-28170][ML][PYTHON] Uniform Vectors and Matrix documentation 048224c is described below commit 048224ce9a3bdb304ba24852ecc66c7f14c25c11 Author: Marco Gaido <marcogaid...@gmail.com> AuthorDate: Mon Jul 1 11:40:12 2019 +0900 [SPARK-28170][ML][PYTHON] Uniform Vectors and Matrix documentation ## What changes were proposed in this pull request? The documentation in `linalg.py` is not consistent. This PR uniforms the documentation. ## How was this patch tested? NA Closes #25011 from mgaido91/SPARK-28170. Authored-by: Marco Gaido <marcogaid...@gmail.com> Signed-off-by: HyukjinKwon <gurwls...@apache.org> --- python/pyspark/ml/linalg/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/pyspark/ml/linalg/__init__.py b/python/pyspark/ml/linalg/__init__.py index f99161c..f6ddc09 100644 --- a/python/pyspark/ml/linalg/__init__.py +++ b/python/pyspark/ml/linalg/__init__.py @@ -386,14 +386,14 @@ class DenseVector(Vector): def toArray(self): """ - Returns an numpy.ndarray + Returns the underlying numpy.ndarray """ return self.array @property def values(self): """ - Returns a list of values + Returns the underlying numpy.ndarray """ return self.array @@ -681,7 +681,7 @@ class SparseVector(Vector): def toArray(self): """ - Returns a copy of this SparseVector as a 1-dimensional NumPy array. + Returns a copy of this SparseVector as a 1-dimensional numpy.ndarray. """ arr = np.zeros((self.size,), dtype=np.float64) arr[self.indices] = self.values @@ -862,7 +862,7 @@ class Matrix(object): def toArray(self): """ - Returns its elements in a NumPy ndarray. + Returns its elements in a numpy.ndarray. """ raise NotImplementedError @@ -937,7 +937,7 @@ class DenseMatrix(Matrix): def toArray(self): """ - Return an numpy.ndarray + Return a numpy.ndarray >>> m = DenseMatrix(2, 2, range(4)) >>> m.toArray() @@ -1121,7 +1121,7 @@ class SparseMatrix(Matrix): def toArray(self): """ - Return an numpy.ndarray + Return a numpy.ndarray """ A = np.zeros((self.numRows, self.numCols), dtype=np.float64, order='F') for k in xrange(self.colPtrs.size - 1): --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org