Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e12012

Browse files
committed
compare: Use int16 instead of int32 arrays.
1 parent 7a9a71b commit 4e12012

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/testing/compare.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ def compare_images( expected, actual, tol, in_decorator=False ):
307307

308308
# convert to signed integers, so that the images can be subtracted without
309309
# overflow
310-
expectedImage = expectedImage.astype(np.int32)
311-
actualImage = actualImage.astype(np.int32)
310+
expectedImage = expectedImage.astype(np.int16)
311+
actualImage = actualImage.astype(np.int16)
312312

313313
rms = calculate_rms(expectedImage, actualImage)
314314

0 commit comments

Comments
 (0)