From 81c28f9b3547d0e08ce5d240354c69aa73f8b041 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Tue, 11 Oct 2016 15:22:37 -0600 Subject: [PATCH] MNT: Remove unused argument (Fixes #207) --- metpy/calc/tests/test_tools.py | 2 +- metpy/calc/tools.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/metpy/calc/tests/test_tools.py b/metpy/calc/tests/test_tools.py index 0af6f2197a1..fd28b761d9b 100644 --- a/metpy/calc/tests/test_tools.py +++ b/metpy/calc/tests/test_tools.py @@ -25,7 +25,7 @@ def test_nearest_intersection_idx(): y2 = 100 * x - 650 truth = np.array([2, 12]) - assert_array_equal(truth, nearest_intersection_idx(x, y1, y2)) + assert_array_equal(truth, nearest_intersection_idx(y1, y2)) def test_find_intersections(): diff --git a/metpy/calc/tools.py b/metpy/calc/tools.py index 29ea9f0bc7d..1bb8748636e 100644 --- a/metpy/calc/tools.py +++ b/metpy/calc/tools.py @@ -36,15 +36,13 @@ def resample_nn_1d(a, centers): @exporter.export -def nearest_intersection_idx(x, a, b): +def nearest_intersection_idx(a, b): """ Determines the index of the point just before two lines with common x values. Parameters ---------- - x : array-like - 1-dimensional array of numeric x-values a : array-like 1-dimensional array of y-values for line 1 b : array-like @@ -87,7 +85,7 @@ def find_intersections(x, a, b): """ # Find the index of the points just before the intersection(s) - nearest_idx = nearest_intersection_idx(x, a, b) + nearest_idx = nearest_intersection_idx(a, b) # Make an empty array to hold what we'll need for calculating # approximate intersections. Each row is an intersection