Skip to content

Commit

Permalink
Use the new assignment method in _binary_num_operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
leftaroundabout committed Dec 3, 2024
1 parent 4f83a48 commit 1aa9221
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions odl/set/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,12 @@ def _binary_num_operation(self, low_level_method, x1, x2, out=None):

else:
assert(paradigms.out_of_place.is_supported)
result = self.element(low_level_method(x1, x2, out=None))
if out is not None:
out[:] = low_level_method(x1, x2, out=None)
out.assign(result, avoid_deep_copy=True)
return out
else:
return self.element(low_level_method(x1, x2, out=None))
return result

def multiply(self, x1, x2, out=None):
"""Return the pointwise product of ``x1`` and ``x2``.
Expand Down

0 comments on commit 1aa9221

Please sign in to comment.