summaryrefslogtreecommitdiff
path: root/silx/math/test/test_colormap.py
diff options
context:
space:
mode:
authorAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2019-07-09 10:20:39 +0200
committerAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2019-07-09 10:20:39 +0200
commit032cc0bed452e96456cdc499f98ccaf473416978 (patch)
tree514f4532d1ab4dcbea0495488e6dd30bc422a94b /silx/math/test/test_colormap.py
parent8ff15764a99df31a5d75e1e19a89b413408cfcc2 (diff)
parent654a6ac93513c3cc1ef97cacd782ff674c6f4559 (diff)
Update upstream source from tag 'upstream/0.11.0+dfsg'
Update to upstream version '0.11.0+dfsg' with Debian dir 711605a3a57c11c3b5d699da5819c94403f8ac62
Diffstat (limited to 'silx/math/test/test_colormap.py')
-rw-r--r--silx/math/test/test_colormap.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/silx/math/test/test_colormap.py b/silx/math/test/test_colormap.py
index ede7d8d..cafe537 100644
--- a/silx/math/test/test_colormap.py
+++ b/silx/math/test/test_colormap.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -34,6 +34,7 @@ __date__ = "16/05/2018"
import logging
import sys
import unittest
+import warnings
import numpy
@@ -66,7 +67,10 @@ class TestColormap(ParametricTestCase):
'sqrt': numpy.sqrt}
norm_function = norm_functions[normalization]
- norm_data, vmin, vmax = map(norm_function, (data, vmin, vmax))
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=RuntimeWarning)
+ # Ignore divide by zero and invalid value encountered in log10, sqrt
+ norm_data, vmin, vmax = map(norm_function, (data, vmin, vmax))
if normalization == 'arcsinh' and sys.platform == 'win32':
# There is a difference of behavior of numpy.arcsinh