Commit 992bd8b6 authored by Philipp Arras's avatar Philipp Arras
Browse files

Merge branch 'add_useful_error' into even_more_fun_with_linear_operators

parents a440afc4 72ede95a
Pipeline #31122 passed with stages
in 1 minute and 29 seconds
......@@ -147,10 +147,14 @@ class LOSResponse(LinearOperator):
sigmas_up = np.zeros(nlos, dtype=np.float32)
sigmas_low = np.array(sigmas_low)
sigmas_up = np.array(sigmas_up)
assert starts.shape[0] == ndim, "dimension mismatch"
assert nlos == sigmas_low.shape[0], "dimension mismatch"
assert starts.shape == ends.shape, "dimension mismatch"
assert sigmas_low.shape == sigmas_up.shape, "dimension mismatch"
if starts.shape[0] != ndim:
raise TypeError("dimension mismatch")
if nlos != sigmas_low.shape[0]:
raise TypeError("dimension mismatch")
if starts.shape != ends.shape:
raise TypeError("dimension mismatch")
if sigmas_low.shape != sigmas_up.shape:
raise TypeError("dimension mismatch")
self._local_shape = dobj.local_shape(self.domain[0].shape)
local_zero_point = (np.array(
......@@ -49,7 +49,7 @@ class MultiDomain(frozendict):
def __init__(self, domain, _callingfrommake=False):
if not _callingfrommake:
raise NotImplementedError
raise NotImplementedError('To create a MultiDomain call `MultiDomain.make()`.')
super(MultiDomain, self).__init__(domain)
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