You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The direct method needs to catch if out is a DataContainer similarly to the adjoint method, i.e something like:
def direct(self, x, out=None):
if out is None:
blah
else:
tmp = self.range_geometry().allocate() # could be a DataContainer
for row in range(self.shape[0]):
for col in range(self.shape[1]):
if col == 0:
if issubclass(out.__class__, DataContainer) or \
(has_sirf and issubclass(out.__class__, SIRFDataContainer)):
self.get_item(row, col).direct(
x_b.get_item(col),
out=out)
else:
self.get_item(row,col).direct(
x_b.get_item(col),
out=out.get_item(row))
else:
if issubclass(out.__class__, DataContainer) or \
(has_sirf and issubclass(out.__class__, SIRFDataContainer)):
out += self.get_item(row,col).direct(x_b.get_item(col), out=out)
else:
temp_out_row = out.get_item(row) # temp_out_row points to the element in out that we are adding to
self.get_item(row,col).direct(
x_b.get_item(col),
out=tmp.get_item(row))
temp_out_row += tmp.get_item(row)
return out
The text was updated successfully, but these errors were encountered:
The direct method needs to catch if out is a
DataContainer
similarly to the adjoint method, i.e something like:The text was updated successfully, but these errors were encountered: