Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit febad98

Browse filesBrowse files
committed
BUG: fix normalizing image data contained in np.ndarray subclass
1 parent 09eab5b commit febad98
Copy full SHA for febad98

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎lib/matplotlib/image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/image.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,12 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
461461
vmid = np.float64(self.norm.vmin) + dv / 2
462462
fact = 1e7 if scaled_dtype == np.float64 else 1e4
463463
newmin = vmid - dv * fact
464-
if newmin < a_min:
464+
if newmin < np.float64(a_min):
465465
newmin = None
466466
else:
467467
a_min = np.float64(newmin)
468468
newmax = vmid + dv * fact
469-
if newmax > a_max:
469+
if newmax > np.float64(a_max):
470470
newmax = None
471471
else:
472472
a_max = np.float64(newmax)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.