Commit 54d832c6 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cosmetics

parent d3114d0e
Pipeline #103378 passed with stages
in 17 minutes and 39 seconds
......@@ -225,11 +225,11 @@ class GaussianEntropy(EnergyOperator):
def apply(self, x):
self._check_input(x)
if isinstance(x, Field):
if not (np.issubdtype(x.dtype, np.floating)):
if not np.issubdtype(x.dtype, np.floating):
raise NotImplementedError("only real fields are allowed")
if isinstance(x, MultiField):
for key in x.keys():
if not (np.issubdtype(x[key].dtype, np.floating)):
if not np.issubdtype(x[key].dtype, np.floating):
raise NotImplementedError("only real fields are allowed")
res = (x*x).scale(2*np.pi*np.e).log().sum().scale(-0.5)
if not isinstance(x, Linearization):
......
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