Skip to content

Commit 50e5f76

Browse files
committed
Fix imshow to work with subclasses of ndarray. Fix matplotlib#18077
1 parent 035bf30 commit 50e5f76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
444444
# of over numbers.
445445
self.norm.autoscale_None(A)
446446
dv = np.float64(self.norm.vmax) - np.float64(self.norm.vmin)
447-
vmid = self.norm.vmin + dv / 2
447+
vmid = np.float64(self.norm.vmin) + dv / 2
448448
fact = 1e7 if scaled_dtype == np.float64 else 1e4
449449
newmin = vmid - dv * fact
450450
if newmin < a_min:

0 commit comments

Comments
 (0)