Suppress RuntimeWarning in interp2d

This commit is contained in:
usov_i 2021-12-23 15:37:05 +01:00
parent 741a09819c
commit 53ceac21aa

View File

@ -4,6 +4,7 @@ import itertools
import os import os
import tempfile import tempfile
import types import types
import warnings
import numpy as np import numpy as np
from bokeh.io import curdoc from bokeh.io import curdoc
@ -343,7 +344,9 @@ def create():
ov_param_plot_scatter_source.data.update(x=x, y=y, param=par) ov_param_plot_scatter_source.data.update(x=x, y=y, param=par)
try: try:
interp_f = interpolate.interp2d(x, y, par) with warnings.catch_warnings():
warnings.simplefilter("ignore", category=RuntimeWarning)
interp_f = interpolate.interp2d(x, y, par)
x1, x2 = min(x), max(x) x1, x2 = min(x), max(x)
y1, y2 = min(y), max(y) y1, y2 = min(y), max(y)
image = interp_f( image = interp_f(