Skip to content

Commit 5bcfbc4

Browse files
committed
update test to add scientific notations
1 parent e86bf38 commit 5bcfbc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/pyspark/mllib/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def loadLabeledPoints(sc, path, minPartitions=None):
170170
171171
>>> from tempfile import NamedTemporaryFile
172172
>>> from pyspark.mllib.util import MLUtils
173-
>>> examples = [LabeledPoint(1.1, Vectors.sparse(3, [(0, 1.23), (2, 4.56)])), \
173+
>>> examples = [LabeledPoint(1.1, Vectors.sparse(3, [(0, -1.23), (2, 4.56e-7)])), \
174174
LabeledPoint(0.0, Vectors.dense([1.01, 2.02, 3.03]))]
175175
>>> tempFile = NamedTemporaryFile(delete=True)
176176
>>> tempFile.close()
@@ -179,7 +179,7 @@ def loadLabeledPoints(sc, path, minPartitions=None):
179179
>>> type(loaded[0]) == LabeledPoint
180180
True
181181
>>> print examples[0]
182-
(1.1,(3,[0,2],[1.23,4.56]))
182+
(1.1,(3,[0,2],[-1.23,4.56e-07]))
183183
>>> type(examples[1]) == LabeledPoint
184184
True
185185
>>> print examples[1]

0 commit comments

Comments
 (0)