Commit 7b2afe4d authored by Theo Steininger's avatar Theo Steininger

Fixed reshaping bugs in DiagonalOperator and FFTSmoothingOperator

parent a35d8a83
Pipeline #15657 failed with stages
in 6 minutes and 20 seconds
......@@ -286,7 +286,7 @@ class DiagonalOperator(EndomorphicOperator):
distribution_strategy=axes_local_distribution_strategy)
local_diagonal = redistr_diagonal_val.get_local_data(copy=False)
reshaper = [x.shape[i] if i in active_axes else 1
reshaper = [x.val.data.shape[i] if i in active_axes else 1
for i in xrange(len(x.shape))]
reshaped_local_diagonal = np.reshape(local_diagonal, reshaper)
......
......@@ -46,7 +46,7 @@ class FFTSmoothingOperator(SmoothingOperator):
local_transformed_x = transformed_x.val.get_local_data(copy=False)
local_kernel = kernel.get_local_data(copy=False)
reshaper = [transformed_x.shape[i] if i in coaxes else 1
reshaper = [local_transformed_x.shape[i] if i in coaxes else 1
for i in xrange(len(transformed_x.shape))]
local_kernel = np.reshape(local_kernel, reshaper)
......
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