Skip to content

Commit

Permalink
use nanpercentile
Browse files Browse the repository at this point in the history
  • Loading branch information
djdt committed Feb 2, 2024
1 parent e979b5e commit 21b2b15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pewpew/graphics/imageitems.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ def redraw(self) -> None:
rgb = 1.0 - rgb

# Normalise to range
vmin, vmax = np.percentile(self.raw_data[:, :, i], element.prange)
vmin, vmax = np.nanpercentile(self.raw_data[:, :, i], element.prange)
x = np.clip(self.raw_data[:, :, i], vmin, vmax)
if vmin != vmax:
x = (x - vmin) / (vmax - vmin)
Expand Down

0 comments on commit 21b2b15

Please sign in to comment.