Commit 3a39e997 authored by inhuszar's avatar inhuszar
Browse files

Bugfix: TImage weighted centre

parent f29bab73
......@@ -2252,7 +2252,7 @@ class TImage(TField):
# TODO: This is too slow for large arrays...
weights = self.reduce_tensors(copy=True)
weights.order = ts.TENSOR_MAJOR
weights /= np.max(weights)
weights = weights / np.max(weights)
if self.mask is not None:
weights = weights * self.mask / np.max(self.mask)
pc = self.domain.get_physical_coordinates()
......
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