Skip to content

Commit

Permalink
Fix type errors in str method in Deterministic()
Browse files Browse the repository at this point in the history
  • Loading branch information
aleju committed Sep 28, 2017
1 parent 558fe4b commit 2c57c71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions imgaug/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ def __repr__(self):
return self.__str__()

def __str__(self):
if isinstance(self.value, int):
if ia.is_single_integer(self.value):
return "Deterministic(int %d)" % (self.value,)
else:
elif ia.is_single_float(self.value):
return "Deterministic(float %.8f)" % (self.value,)
else:
return "Deterministic(%s)" % (str(self.value),)

class FromLowerResolution(StochasticParameter):
def __init__(self, other_param, size_percent=None, size_px=None, method="nearest", min_size=1):
Expand Down

0 comments on commit 2c57c71

Please sign in to comment.