Commit 80450156 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Check normalization array shape

parent 8f3cad4d
......@@ -321,6 +321,12 @@ class SinoNormalization:
raise ValueError(
"Expected 'normalization_array' to be provided as a numpy array for normalization kind='%s'" % kind
)
if normalization_array.shape[-1] != self.sinos_shape[-1]:
n_a, n_x = self.sinos_shape[-2:]
raise ValueError(
"Expected normalization_array to have shape (%d, %d) or (%d, )"
% (n_a, n_x, n_x)
)
self.norm_operation = self.operations[kind]
self._normalization_instance_method = self._normalize_op
self.normalization_array = normalization_array
......
Supports Markdown
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