Skip to content

Commit

Permalink
ViewCanvas: replace np.ndarray.ptp for numpy 2 compatibility (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
carandraug committed Jun 7, 2024
1 parent 6f441e2 commit 5326c4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cockpit/gui/imageViewer/viewCanvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def _createTextures(self):
else:
# Need to use multiple textures to store data.
tx = ty = self._maxTexEdge
self.dptp = data.ptp()
self.dptp = np.ptp(data)
self.dmin = data.min()
if self.dptp < 1e-6:
self.dptp = 1
Expand Down

0 comments on commit 5326c4b

Please sign in to comment.