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

Check that normalization_array is a numpy array

parent a12a65c9
......@@ -309,9 +309,9 @@ class SinoNormalization:
def _set_kind(self, kind, normalization_array):
check_supported(kind, self.kinds, "sinogram normalization kind")
self.normalization_kind = kind
if "array" in kind and normalization_array is None:
if "array" in kind and not isinstance(normalization_array, np.ndarray):
raise ValueError(
"Expected 'normalization_array' to be provided for normalization kind='%s'" % kind
"Expected 'normalization_array' to be provided as a numpy array for normalization kind='%s'" % kind
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