diff options
author | Zheng RuiFeng <ruifengz@foxmail.com> | 2016-05-04 10:59:36 -0700 |
---|---|---|
committer | Davies Liu <davies.liu@gmail.com> | 2016-05-04 10:59:36 -0700 |
commit | 4530250f5a51a77f9d0b91f036f8e44e0f943a32 (patch) | |
tree | 482fc116fd599f786ff6d4c8871073b71d721acc /examples/src/main/python/mllib | |
parent | b85d21fb9dc3d498d9a10e065d254abde797efb6 (diff) | |
download | spark-4530250f5a51a77f9d0b91f036f8e44e0f943a32.tar.gz spark-4530250f5a51a77f9d0b91f036f8e44e0f943a32.tar.bz2 spark-4530250f5a51a77f9d0b91f036f8e44e0f943a32.zip |
[MINOR] Add python3 compatibility in python examples
## What changes were proposed in this pull request?
Add python3 compatibility in python examples
## How was this patch tested?
manual tests
Author: Zheng RuiFeng <ruifengz@foxmail.com>
Closes #12868 from zhengruifeng/fix_gmm_py.
Diffstat (limited to 'examples/src/main/python/mllib')
-rw-r--r-- | examples/src/main/python/mllib/gaussian_mixture_model.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/src/main/python/mllib/gaussian_mixture_model.py b/examples/src/main/python/mllib/gaussian_mixture_model.py index 69e836fc1d..6b46e27dda 100644 --- a/examples/src/main/python/mllib/gaussian_mixture_model.py +++ b/examples/src/main/python/mllib/gaussian_mixture_model.py @@ -20,6 +20,10 @@ A Gaussian Mixture Model clustering program using MLlib. """ from __future__ import print_function +import sys +if sys.version >= '3': + long = int + import random import argparse import numpy as np |