Commit ecc96428 authored by Gordian Edenhofer's avatar Gordian Edenhofer
Browse files

correlated_fields.py: Use ScalingOperator

Where applicable, use a ScalingOperator instead of a DiagonalOperator.
parent ff7dfaa8
......@@ -69,7 +69,9 @@ def _normal(mean, sig, key, N=0):
if N == 0:
domain = DomainTuple.scalar_domain()
mean, sig = np.asfarray(mean), np.asfarray(sig)
else:
return Adder(makeField(domain, mean)) @ (
sig * ducktape(domain, None, key))
domain = UnstructuredDomain(N)
mean, sig = (_reshaper(param, N) for param in (mean, sig))
return Adder(makeField(domain, mean)) @ (DiagonalOperator(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment