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 0bc1568

Browse filesBrowse files
committed
Remove dead RMS computation code
1 parent 26b18e2 commit 0bc1568
Copy full SHA for 0bc1568

File tree

Expand file treeCollapse file tree

1 file changed

+0
-26
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-26
lines changed

‎lib/matplotlib/testing/compare.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/compare.py
-26Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -306,32 +306,6 @@ def compare_images( expected, actual, tol, in_decorator=False ):
306306
expected_version = version.LooseVersion("1.6")
307307
found_version = version.LooseVersion(np.__version__)
308308

309-
# On Numpy 1.6, we can use bincount with minlength, which is much faster than
310-
# using histogram
311-
if found_version >= expected_version:
312-
rms = 0
313-
314-
for i in xrange(0, 3):
315-
h1p = expectedImage[:,:,i]
316-
h2p = actualImage[:,:,i]
317-
318-
h1h = np.bincount(h1p.ravel(), minlength=256)
319-
h2h = np.bincount(h2p.ravel(), minlength=256)
320-
321-
rms += np.sum(np.power((h1h-h2h), 2))
322-
else:
323-
rms = 0
324-
ns = np.arange(257)
325-
326-
for i in xrange(0, 3):
327-
h1p = expectedImage[:,:,i]
328-
h2p = actualImage[:,:,i]
329-
330-
h1h = np.histogram(h1p, bins=ns)[0]
331-
h2h = np.histogram(h2p, bins=ns)[0]
332-
333-
rms += np.sum(np.power((h1h-h2h), 2))
334-
335309
rms = calculate_rms(expectedImage, actualImage)
336310

337311
diff_image = make_test_filename(actual, 'failed-diff')

0 commit comments

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