From ab0963dedba3b8bc084d97a9c8321fe18a23e070 Mon Sep 17 00:00:00 2001 From: Jonathan Feinberg Date: Sat, 18 May 2024 12:41:28 +0200 Subject: [PATCH] formatting --- chaospy/descriptives/conditional.py | 4 +++- chaospy/distributions/sampler/generator.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chaospy/descriptives/conditional.py b/chaospy/descriptives/conditional.py index b18134a..b809b59 100644 --- a/chaospy/descriptives/conditional.py +++ b/chaospy/descriptives/conditional.py @@ -57,7 +57,9 @@ def E_cond(poly, freeze, dist, **kws): if not freeze.isconstant(): poly, freeze = numpoly.align_indeterminants(poly, freeze) poly, freeze = numpoly.align_exponents(poly, freeze) - freeze = freeze.exponents[numpy.array(freeze.coefficients, dtype=bool)].flatten() + freeze = freeze.exponents[ + numpy.array(freeze.coefficients, dtype=bool) + ].flatten() else: freeze = freeze.tonumpy() diff --git a/chaospy/distributions/sampler/generator.py b/chaospy/distributions/sampler/generator.py index 0de3c0d..b703b3e 100644 --- a/chaospy/distributions/sampler/generator.py +++ b/chaospy/distributions/sampler/generator.py @@ -90,7 +90,7 @@ def generate_samples(order, domain=1, rule="random", antithetic=None): order_saved = order order = int(numpy.log(order - dim)) order = order if order > 1 else 1 - while (order - 1) * 2**(dim - 1) < order_saved: + while (order - 1) * 2 ** (dim - 1) < order_saved: order += 1 trans_ = trans trans = lambda x_data: trans_(