Skip to content

Commit

Permalink
Fixed typo in pyspark sparsevector doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbradley committed Jul 20, 2015
1 parent c6fe9b4 commit e2dcb23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyspark/mllib/linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def dot(self, other):
25.0
>>> a.dot(array.array('d', [1., 2., 3., 4.]))
22.0
>>> b = SparseVector(4, [2, 4], [1.0, 2.0])
>>> b = SparseVector(4, [2], [1.0])
>>> a.dot(b)
0.0
>>> a.dot(np.array([[1, 1], [2, 2], [3, 3], [4, 4]]))
Expand Down Expand Up @@ -624,7 +624,7 @@ def squared_distance(self, other):
11.0
>>> a.squared_distance(np.array([1., 2., 3., 4.]))
11.0
>>> b = SparseVector(4, [2, 4], [1.0, 2.0])
>>> b = SparseVector(4, [2], [1.0])
>>> a.squared_distance(b)
30.0
>>> b.squared_distance(a)
Expand Down

0 comments on commit e2dcb23

Please sign in to comment.