diff options
author | Shuai Lin <linshuai2012@gmail.com> | 2016-05-03 18:02:12 -0700 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2016-05-03 18:02:12 -0700 |
commit | c4e0fde876fff259308d1d58ab51ae2697ae31f1 (patch) | |
tree | a2345fd8460cbd3615341ba77fef1ca957fa7bae | |
parent | dbacd99983a81d35476618be1615807ebba88f05 (diff) | |
download | spark-c4e0fde876fff259308d1d58ab51ae2697ae31f1.tar.gz spark-c4e0fde876fff259308d1d58ab51ae2697ae31f1.tar.bz2 spark-c4e0fde876fff259308d1d58ab51ae2697ae31f1.zip |
[MINOR][DOC] Fixed some python snippets in mllib data types documentation.
## What changes were proposed in this pull request?
Some python snippets is using scala imports and comments.
## How was this patch tested?
Generated the docs locally with `SKIP_API=1 jekyll build` and viewed the changes in the browser.
Author: Shuai Lin <linshuai2012@gmail.com>
Closes #12869 from lins05/fix-mllib-python-snippets.
-rw-r--r-- | docs/mllib-data-types.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/mllib-data-types.md b/docs/mllib-data-types.md index 5e3ee472a7..2ffe0f1c2b 100644 --- a/docs/mllib-data-types.md +++ b/docs/mllib-data-types.md @@ -314,12 +314,12 @@ matrices. Remember, local matrices in MLlib are stored in column-major order. Refer to the [`Matrix` Python docs](api/python/pyspark.mllib.html#pyspark.mllib.linalg.Matrix) and [`Matrices` Python docs](api/python/pyspark.mllib.html#pyspark.mllib.linalg.Matrices) for more details on the API. {% highlight python %} -import org.apache.spark.mllib.linalg.{Matrix, Matrices} +from pyspark.mllib.linalg import Matrix, Matrices -// Create a dense matrix ((1.0, 2.0), (3.0, 4.0), (5.0, 6.0)) +# Create a dense matrix ((1.0, 2.0), (3.0, 4.0), (5.0, 6.0)) dm2 = Matrices.dense(3, 2, [1, 2, 3, 4, 5, 6]) -// Create a sparse matrix ((9.0, 0.0), (0.0, 8.0), (0.0, 6.0)) +# Create a sparse matrix ((9.0, 0.0), (0.0, 8.0), (0.0, 6.0)) sm = Matrices.sparse(3, 2, [0, 1, 3], [0, 2, 1], [9, 6, 8]) {% endhighlight %} </div> |