Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing raise
  • Loading branch information
zero323 committed Mar 25, 2017
commit 159f2ad15c59150923507cfde19103a70ed8d0c5
8 changes: 4 additions & 4 deletions python/pyspark/ml/fpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def setMinSupport(self, value):
"""
Sets the value of :py:attr:`minSupport`.
"""
if not 0 <= value <= 1:
ValueError("Support must be in range [0, 1]")
if not (0 <= value <= 1):
raise ValueError("Support must be in range [0, 1]")
return self._set(minSupport=value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removed too much! This line should remain


def getMinSupport(self):
Expand All @@ -65,8 +65,8 @@ def setMinConfidence(self, value):
"""
Sets the value of :py:attr:`minConfidence`.
"""
if not 0 <= value <= 1:
ValueError("Confidence must be in range [0, 1]")
if not (0 <= value <= 1):
raise ValueError("Confidence must be in range [0, 1]")
return self._set(minConfidence=value)

def getMinConfidence(self):
Expand Down