Commit c2c4a98f authored by Reimar Heinrich Leike's avatar Reimar Heinrich Leike

deleted senseless requirement in GaussianEnergy

parent a523358e
Pipeline #46468 passed with stages
in 8 minutes and 7 seconds
...@@ -20,6 +20,7 @@ import numpy as np ...@@ -20,6 +20,7 @@ import numpy as np
from .. import utilities from .. import utilities
from ..domain_tuple import DomainTuple from ..domain_tuple import DomainTuple
from ..field import Field from ..field import Field
from ..multi_field import MultiField
from ..linearization import Linearization from ..linearization import Linearization
from ..sugar import makeDomain, makeOp from ..sugar import makeDomain, makeOp
from .linear_operator import LinearOperator from .linear_operator import LinearOperator
...@@ -122,7 +123,8 @@ class GaussianEnergy(EnergyOperator): ...@@ -122,7 +123,8 @@ class GaussianEnergy(EnergyOperator):
def __init__(self, mean=None, covariance=None, domain=None): def __init__(self, mean=None, covariance=None, domain=None):
if mean is not None and not isinstance(mean, Field): if mean is not None and not isinstance(mean, Field):
raise TypeError if not isinstance(mean, MultiField):
raise TypeError
if covariance is not None and not isinstance(covariance, if covariance is not None and not isinstance(covariance,
LinearOperator): LinearOperator):
raise TypeError raise TypeError
......
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