From 35bbff494a1583241c3c88859f99621d5902ec51 Mon Sep 17 00:00:00 2001 From: Krishna Acharya Date: Mon, 23 Mar 2026 01:32:16 +0545 Subject: [PATCH] Fix mypy arg-type error in test_line_collection.py Wrap np.amin()/np.amax() calls in float() to fix arg-type error when passing numpy scalar types to set_xlim()/set_ylim(). --- tests/test_line_collection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_line_collection.py b/tests/test_line_collection.py index dccff782..06cfeab3 100644 --- a/tests/test_line_collection.py +++ b/tests/test_line_collection.py @@ -28,8 +28,8 @@ def plot() -> Figure: # We need to set the plot limits, they will not autoscale ax = plt.axes() - ax.set_xlim((np.amin(x), np.amax(x))) - ax.set_ylim((np.amin(np.amin(ys)), np.amax(np.amax(ys)))) + ax.set_xlim((float(np.amin(x)), float(np.amax(x)))) + ax.set_ylim((float(np.amin(np.amin(ys))), float(np.amax(np.amax(ys))))) # colors is sequence of rgba tuples # linestyle is a string or dash tuple. Legal string values are