Commit 95248edc authored by Martin Reinecke's avatar Martin Reinecke

add a few FIXMEs

parent cd0fda66
Pipeline #12736 passed with stage
in 4 minutes and 37 seconds
......@@ -144,6 +144,7 @@ class DirectSmoothingOperator(SmoothingOperator):
distribution_strategy='not')
distance_array = distance_array.get_local_data(copy=False)
#MR FIXME: this causes calls of log(0.) which should probably be avoided
if self.log_distances:
np.log(distance_array, out=distance_array)
......
......@@ -24,6 +24,7 @@ class FFTSmoothingOperator(SmoothingOperator):
kernel = codomain.get_distance_array(
distribution_strategy=axes_local_distribution_strategy)
#MR FIXME: this causes calls of log(0.) which should probably be avoided
if self.log_distances:
kernel.apply_scalar_function(np.log, inplace=True)
......@@ -43,6 +44,7 @@ class FFTSmoothingOperator(SmoothingOperator):
# apply the kernel
if inverse:
#MR FIXME: danger of having division by zero or overflows
local_transformed_x /= local_kernel
else:
local_transformed_x *= local_kernel
......
......@@ -106,6 +106,7 @@ class DiagonalOperator_Tests(unittest.TestCase):
assert_allclose(trace_op, np.sum(1./diag.val.get_full_data()))
@expand(product(spaces, [True, False]))
#MR FIXME: what if any diagonal element <=0?
def test_trace_log(self, space, copy):
diag = Field.from_random('normal', domain=space)
D = DiagonalOperator(space, diagonal=diag, copy=copy)
......@@ -127,6 +128,7 @@ class DiagonalOperator_Tests(unittest.TestCase):
assert_allclose(inv_det, 1./D.determinant())
@expand(product(spaces, [True, False], [True, False]))
#MR FIXME: what if determinant <=0?
def test_log_determinant(self, space, bare, copy):
diag = Field.from_random('normal', domain=space)
D = DiagonalOperator(space, diagonal=diag, bare=bare, copy=copy)
......
......@@ -36,9 +36,6 @@ def _get_rtol(tp):
else:
return 1e-5
from itertools import product
from test.common import expand
class SmoothingOperator_Tests(unittest.TestCase):
spaces = [RGSpace(100)]
......
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