Skip to content

Commit

Permalink
placebo: silently supports integers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ichunjo committed Aug 1, 2021
1 parent 5d6c935 commit 0edbc88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions debandshit/placebo.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ def __init__(self,

self.radius = radius

if isinstance(threshold, float):
if isinstance(threshold, (float, int)):
self.threshold = [threshold] * 3
else:
self.threshold = threshold + [threshold[-1]] * (3 - len(threshold))

self.iterations = iterations

if isinstance(grain, float):
if isinstance(grain, (float, int)):
self.grain = [grain] * 3
else:
self.grain = grain + [grain[-1]] * (3 - len(grain))
Expand Down

0 comments on commit 0edbc88

Please sign in to comment.