Skip to content

Commit

Permalink
Merge pull request #2786 from ericpre/fix_image_comparison
Browse files Browse the repository at this point in the history
Fix image comparison following numpy 1.21.0 release
  • Loading branch information
jlaehne committed Jun 30, 2021
2 parents 7fed9b2 + 5eccdb2 commit 3a07064
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 2 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions hyperspy/tests/drawing/test_plot_signal2d.py
Expand Up @@ -498,8 +498,8 @@ def test_plot_with_non_finite_value():
@pytest.mark.mpl_image_compare(
baseline_dir=baseline_dir, tolerance=default_tol, style=style_pytest_mpl)
def test_plot_log_negative_value(cmap):
s = hs.signals.Signal2D(np.arange(10*10).reshape(10, 10))
s -= 5*10
s = hs.signals.Signal2D(np.arange(10*10, dtype=float).reshape(10, 10))
s -= 49.5
if cmap:
s.plot(norm='log', cmap=cmap)
else:
Expand Down
1 change: 1 addition & 0 deletions upcoming_changes/2774.maintenance.rst
@@ -0,0 +1 @@
Fix image comparison failure with numpy 1.21.0
1 change: 1 addition & 0 deletions upcoming_changes/README.rst
Expand Up @@ -13,6 +13,7 @@ Each file should be named like ``<ISSUE>.<TYPE>.rst``, where
* ``deprecation``: feature deprecation.
* ``enhancements``: improvement of existing functionality, usually without requiring user intervention.
* ``api``: a change which may break existing script, such as feature removal or behavior change.
* ``maintenance``: a change related to the test suite, packaging, etc.

So for example: ``123.new.rst``, ``456.bugfix.rst``.

Expand Down

0 comments on commit 3a07064

Please sign in to comment.