Commit a40922c5 authored by Philipp Frank's avatar Philipp Frank
Browse files

Merge branch 'adjust_variances_but_right' of...

Merge branch 'adjust_variances_but_right' of into adjust_variances_but_right
parents d569a79e 721cef5b
......@@ -181,11 +181,11 @@ class Linearization(object):
def make_partial_var(field, constants, want_metric=False):
from .operators.scaling_operator import ScalingOperator
from .operators.simple_linear_operators import NullOperator
from .operators.block_diagonal_operator import BlockDiagonalOperator
if len(constants) == 0:
return Linearization.make_var(field, want_metric)
ops = [ScalingOperator(0. if key in constants else 1., dom)
for key, dom in field.domain.items()]
bdop = BlockDiagonalOperator(fielld.domain, tuple(ops))
bdop = BlockDiagonalOperator(field.domain, tuple(ops))
return Linearization(field, bdop, want_metric=want_metric)
Markdown is supported
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