Skip to content

Commit

Permalink
Better checking
Browse files Browse the repository at this point in the history
  • Loading branch information
MechCoder committed Jun 2, 2015
1 parent 22703dd commit e89376c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions python/pyspark/mllib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@
# MLlib currently needs NumPy 1.4+, so complain if lower

import numpy
ver = numpy.version.version

fd = ver.find('.')
ver1 = int(ver[: fd])
ver = ver[fd + 1:]
ver2 = int(ver[: ver.find('.')])

if ver1 < 1 or (ver1 == 1 and ver2 <= 4):
ver = [int(x) for x in numpy.version.version.split(.)[:2]]
if ver < [1, 4]:
raise Exception("MLlib requires NumPy 1.4+")

__all__ = ['classification', 'clustering', 'feature', 'fpm', 'linalg', 'random',
Expand Down

0 comments on commit e89376c

Please sign in to comment.