We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4daf153 commit b919c09Copy full SHA for b919c09
dataikuapi/dss/ml.py
@@ -891,7 +891,13 @@ def range(self):
891
892
class Range(object):
893
894
- def __init__(self, min, max, nb_values=3):
+ def _check_input(self, value):
895
+ assert isinstance(value, (int, float)), "Invalid input type for Range: {}".format(type(value))
896
+
897
+ def __init__(self, min, max, nb_values=None):
898
+ self._check_input(min)
899
+ self._check_input(max)
900
+ assert min <= max, "Invalid Range: min must be lower than max"
901
self.min = min
902
self.max = max
903
self.nb_values = nb_values
0 commit comments