Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Description
Summary
I ran tox on the main branch of matplotlib with the fix from#29393 applied on top. I ran the same set of tests which we run during the Fedora matplotlib build, so invocation looked like this:
tox -e py314 -- -k 'not test_invisible_Line_rendering and not test_form_widget_get_with_datetime_and_date_fields' --pyargs matplotlib mpl_toolkits.axes_grid1 mpl_toolkits.axisartist mpl_toolkits.mplot3d
And the results:
________________________________________________ test_hexbin_log[png] _________________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_hexbin_log[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 35.934):E result_images/test_axes/hexbin_log.pngE result_images/test_axes/hexbin_log-expected.pngE result_images/test_axes/hexbin_log-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure_______________________________________________ test_hexbin_linear[png] _______________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_hexbin_linear[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 20.427):E result_images/test_axes/hexbin_linear.pngE result_images/test_axes/hexbin_linear-expected.pngE result_images/test_axes/hexbin_linear-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure__________________________________________________ test_symlog2[pdf] __________________________________________________args = (), kwds = {'extension': 'pdf', 'request': <FixtureRequest for <Function test_symlog2[pdf]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 12.445):E result_images/test_axes/symlog2_pdf.pngE result_images/test_axes/symlog2-expected_pdf.pngE result_images/test_axes/symlog2_pdf-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure_______________________________________ test_mollweide_forward_inverse_closure ________________________________________ def test_mollweide_forward_inverse_closure(): # test that the round-trip Mollweide forward->inverse transformation is an # approximate identity fig = plt.figure() ax = fig.add_subplot(projection='mollweide') # set up 1-degree grid in longitude, latitude lon = np.linspace(-np.pi, np.pi, 360) # The poles are degenerate and thus sensitive to floating point precision errors lat = np.linspace(-np.pi / 2.0, np.pi / 2.0, 180)[1:-1] lon, lat = np.meshgrid(lon, lat) ll = np.vstack((lon.flatten(), lat.flatten())).T # perform forward transform> xy = ax.transProjection.transform(ll)/home/ksurma/dev/matplotlib/lib/matplotlib/tests/test_axes.py:5021: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/home/ksurma/dev/matplotlib/lib/matplotlib/transforms.py:1523: in transform res = self.transform_affine(self.transform_non_affine(values))/home/ksurma/dev/matplotlib/lib/matplotlib/projections/geo.py:372: in transform_non_affine delta, large_delta = d(theta)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _theta = array([ 3.22129331e+27, 3.22129331e+27, 3.22129331e+27, ..., -3.22129331e+27, -3.22129331e+27, -3.22129331e+27], shape=(61200,)) def d(theta):> delta = (-(theta + np.sin(theta) - pi_sin_l) / (1 + np.cos(theta)))E RuntimeWarning: overflow encountered in divide/home/ksurma/dev/matplotlib/lib/matplotlib/projections/geo.py:355: RuntimeWarning_______________________________________ test_mollweide_inverse_forward_closure ________________________________________ def test_mollweide_inverse_forward_closure(): # test that the round-trip Mollweide inverse->forward transformation is an # approximate identity fig = plt.figure() ax = fig.add_subplot(projection='mollweide') # set up grid in x, y x = np.linspace(0, 1, 500) x, y = np.meshgrid(x, x) xy = np.vstack((x.flatten(), y.flatten())).T # perform inverse transform ll = ax.transProjection.inverted().transform(xy) # perform forward transform> xy2 = ax.transProjection.transform(ll)/home/ksurma/dev/matplotlib/lib/matplotlib/tests/test_axes.py:5045: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/home/ksurma/dev/matplotlib/lib/matplotlib/transforms.py:1523: in transform res = self.transform_affine(self.transform_non_affine(values))/home/ksurma/dev/matplotlib/lib/matplotlib/projections/geo.py:372: in transform_non_affine delta, large_delta = d(theta)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _theta = array([ 0. , 0. , 0. , ..., -3.14323857, -3.14323857, -3.14323857], shape=(250000,)) def d(theta):> delta = (-(theta + np.sin(theta) - pi_sin_l) / (1 + np.cos(theta)))E RuntimeWarning: divide by zero encountered in divide/home/ksurma/dev/matplotlib/lib/matplotlib/projections/geo.py:355: RuntimeWarning______________________________________________ test_specgram_angle[png] _______________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_specgram_angle[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 23.460):E result_images/test_axes/specgram_phase_freqs.pngE result_images/test_axes/specgram_phase_freqs-expected.pngE result_images/test_axes/specgram_phase_freqs-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure__________________________________________ test_proportional_colorbars[png] ___________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_proportional_colorbars[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 47.976):E result_images/test_colorbar/proportional_colorbars.pngE result_images/test_colorbar/proportional_colorbars-expected.pngE result_images/test_colorbar/proportional_colorbars-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure_______________________________________________ test_rgb_hsv_round_trip _______________________________________________x = array([0.5488135 , 0.71518937, 0.60276338, ..., 0.31486942, 0.95593047, 0.76646949], shape=(750000,))y = array([], dtype=float64) def compare(x, y): try: if npany(isinf(x)) or npany(isinf(y)): xinfid = isinf(x) yinfid = isinf(y) if not (xinfid == yinfid).all(): return False # if one item, x and y is +- inf if x.size == y.size == 1: return x == y x = x[~xinfid] y = y[~yinfid] except (TypeError, NotImplementedError): pass # make sure y is an inexact type to avoid abs(MIN_INT); will cause # casting of x later. dtype = result_type(y, 1.) y = np.asanyarray(y, dtype)> z = abs(x - y)E ValueError: operands could not be broadcast together with shapes (750000,) (0,)/home/ksurma/dev/matplotlib/.tox/py314/lib64/python3.14/site-packages/numpy/testing/_private/utils.py:1165: ValueErrorDuring handling of the above exception, another exception occurred: def test_rgb_hsv_round_trip(): for a_shape in [(500, 500, 3), (500, 3), (1, 3), (3,)]: np.random.seed(0) tt = np.random.random(a_shape)> assert_array_almost_equal( tt, mcolors.hsv_to_rgb(mcolors.rgb_to_hsv(tt)))E ValueError: E error during assertion:E E Traceback (most recent call last):E File "/home/ksurma/dev/matplotlib/.tox/py314/lib64/python3.14/site-packages/numpy/testing/_private/utils.py", line 851, in assert_array_compareE val = comparison(x, y)E File "/home/ksurma/dev/matplotlib/.tox/py314/lib64/python3.14/site-packages/numpy/testing/_private/utils.py", line 1165, in compareE z = abs(x - y)E ~~^~~E ValueError: operands could not be broadcast together with shapes (750000,) (0,) E E E Arrays are not almost equal to 6 decimalsE ACTUAL: array([0.548814, 0.715189, 0.602763, ..., 0.314869, 0.95593 , 0.766469],E shape=(750000,))E DESIRED: array([], dtype=float64)/home/ksurma/dev/matplotlib/lib/matplotlib/tests/test_colors.py:947: ValueError_________________________________________ test_light_source_topo_surface[png] _________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_light_source_topo_surface[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 31.976):E result_images/test_colors/light_source_shading_topo.pngE result_images/test_colors/light_source_shading_topo-expected.pngE result_images/test_colors/light_source_shading_topo-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure__________________________________________________ test_labels[png] ___________________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_labels[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 30.608):E result_images/test_contour/contour_test_label_transforms.pngE result_images/test_contour/contour_test_label_transforms-expected.pngE result_images/test_contour/contour_test_label_transforms-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure___________________________________________ test_mask_image_over_under[png] ___________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_mask_image_over_under[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 41.585):E result_images/test_image/mask_image_over_under.pngE result_images/test_image/mask_image_over_under-expected.pngE result_images/test_image/mask_image_over_under-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure______________________________________________ test_rgba_antialias[png] _______________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_rgba_antialias[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 59.938):E result_images/test_image/rgba_antialias.pngE result_images/test_image/rgba_antialias-expected.pngE result_images/test_image/rgba_antialias-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure_______________________________________________ test_downsampling[png] ________________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_downsampling[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 71.138):E result_images/test_image/downsampling.pngE result_images/test_image/downsampling-expected.pngE result_images/test_image/downsampling-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailure_______________________________________________ test_quiver_memory_leak _______________________________________________ @pytest.mark.skipif(platform.python_implementation() != 'CPython', reason='Requires CPython') def test_quiver_memory_leak(): fig, ax = plt.subplots() Q = draw_quiver(ax) ttX = Q.X Q.remove() del Q > assert sys.getrefcount(ttX) == 2E AssertionError/home/ksurma/dev/matplotlib/lib/matplotlib/tests/test_quiver.py:33: AssertionError_____________________________________________ test_quiver_key_memory_leak _____________________________________________ @pytest.mark.skipif(platform.python_implementation() != 'CPython', reason='Requires CPython') def test_quiver_key_memory_leak(): fig, ax = plt.subplots() Q = draw_quiver(ax) qk = ax.quiverkey(Q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$', labelpos='W', fontproperties={'weight': 'bold'})> assert sys.getrefcount(qk) == 3E AssertionError/home/ksurma/dev/matplotlib/lib/matplotlib/tests/test_quiver.py:46: AssertionError_________________________________________________ test_fft_peaks[png] _________________________________________________ @image_comparison(['fft_peaks'], remove_text=True) def test_fft_peaks(): fig, ax = plt.subplots() t = np.arange(65536) p1 = ax.plot(abs(np.fft.fft(np.sin(2*np.pi*.01*t)*np.blackman(len(t))))) # Ensure that the path's transform takes the new axes limits into account. fig.canvas.draw() path = p1[0].get_path() transform = p1[0].get_transform() path = transform.transform_path(path) simplified = path.cleaned(simplify=True) > assert simplified.vertices.size == 36E AssertionError/home/ksurma/dev/matplotlib/lib/matplotlib/tests/test_simplification.py:421: AssertionError_________________________________________________ test_fft_peaks[pdf] _________________________________________________ @image_comparison(['fft_peaks'], remove_text=True) def test_fft_peaks(): fig, ax = plt.subplots() t = np.arange(65536) p1 = ax.plot(abs(np.fft.fft(np.sin(2*np.pi*.01*t)*np.blackman(len(t))))) # Ensure that the path's transform takes the new axes limits into account. fig.canvas.draw() path = p1[0].get_path() transform = p1[0].get_transform() path = transform.transform_path(path) simplified = path.cleaned(simplify=True) > assert simplified.vertices.size == 36E AssertionError/home/ksurma/dev/matplotlib/lib/matplotlib/tests/test_simplification.py:421: AssertionError_________________________________________________ test_fft_peaks[svg] _________________________________________________ @image_comparison(['fft_peaks'], remove_text=True) def test_fft_peaks(): fig, ax = plt.subplots() t = np.arange(65536) p1 = ax.plot(abs(np.fft.fft(np.sin(2*np.pi*.01*t)*np.blackman(len(t))))) # Ensure that the path's transform takes the new axes limits into account. fig.canvas.draw() path = p1[0].get_path() transform = p1[0].get_transform() path = transform.transform_path(path) simplified = path.cleaned(simplify=True) > assert simplified.vertices.size == 36E AssertionError/home/ksurma/dev/matplotlib/lib/matplotlib/tests/test_simplification.py:421: AssertionError___________________________________________ test_tri_smooth_contouring[png] ___________________________________________args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_tri_smooth_contouring[png]>>} @wraps(func) def inner(*args, **kwds): with self._recreate_cm():> return func(*args, **kwds)E matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 123.603):E result_images/test_triangulation/tri_smooth_contouring.pngE result_images/test_triangulation/tri_smooth_contouring-expected.pngE result_images/test_triangulation/tri_smooth_contouring-failed-diff.png/usr/lib64/python3.14/contextlib.py:85: ImageComparisonFailureFAILED tests/test_axes.py::test_hexbin_log[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 35.934):FAILED tests/test_axes.py::test_hexbin_linear[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 20.427):FAILED tests/test_axes.py::test_symlog2[pdf] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 12.445):FAILED tests/test_axes.py::test_mollweide_forward_inverse_closure - RuntimeWarning: overflow encountered in divideFAILED tests/test_axes.py::test_mollweide_inverse_forward_closure - RuntimeWarning: divide by zero encountered in divideFAILED tests/test_axes.py::test_specgram_angle[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 23.460):FAILED tests/test_colorbar.py::test_proportional_colorbars[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 47.976):FAILED tests/test_colors.py::test_rgb_hsv_round_trip - ValueError: FAILED tests/test_colors.py::test_light_source_topo_surface[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 31.976):FAILED tests/test_contour.py::test_labels[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 30.608):FAILED tests/test_image.py::test_mask_image_over_under[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 41.585):FAILED tests/test_image.py::test_rgba_antialias[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 59.938):FAILED tests/test_image.py::test_downsampling[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 71.138):FAILED tests/test_quiver.py::test_quiver_memory_leak - AssertionErrorFAILED tests/test_quiver.py::test_quiver_key_memory_leak - AssertionErrorFAILED tests/test_simplification.py::test_fft_peaks[png] - AssertionErrorFAILED tests/test_simplification.py::test_fft_peaks[pdf] - AssertionErrorFAILED tests/test_simplification.py::test_fft_peaks[svg] - AssertionErrorFAILED tests/test_triangulation.py::test_tri_smooth_contouring[png] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 123.603):================= 19 failed, 9423 passed, 507 skipped, 2 deselected, 30 xfailed in 330.41s (0:05:30) ==================
Proposed fix
No response