From 0edbc88a6d9eba988043c404c72d5a2d2005530b Mon Sep 17 00:00:00 2001 From: Ichunjo Date: Sun, 1 Aug 2021 23:17:12 +0200 Subject: [PATCH] placebo: silently supports integers --- debandshit/placebo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debandshit/placebo.py b/debandshit/placebo.py index d002e10..be375c9 100644 --- a/debandshit/placebo.py +++ b/debandshit/placebo.py @@ -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))