Skip to content

Commit

Permalink
[easy] use the xarray property
Browse files Browse the repository at this point in the history
Instead of reaching into the private _data field, use the xarray property.

Test plan: `pytest -v -n8  --ff starfish/core/image/Filter/test`

Part of #834
  • Loading branch information
Tony Tung committed Sep 10, 2019
1 parent 766d325 commit 0878b0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions starfish/core/image/Filter/element_wise_mult.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def run(
self.run(stack, in_place=True)
return stack

stack._data.data.values *= mult_array_aligned
stack.xarray.values *= mult_array_aligned
if self.clip_method == Clip.CLIP:
stack._data.data.values = preserve_float_range(stack._data.data.values, rescale=False)
stack.xarray.values = preserve_float_range(stack.xarray.values, rescale=False)
else:
stack._data.data.values = preserve_float_range(stack._data.data.values, rescale=True)
stack.xarray.values = preserve_float_range(stack.xarray.values, rescale=True)
return None

0 comments on commit 0878b0b

Please sign in to comment.