From ec6e57c50fb724f128500054f3b240a478b6f2d7 Mon Sep 17 00:00:00 2001 From: josidd <joseph.siddons@noc.ac.uk> Date: Tue, 8 Oct 2024 09:48:55 +0100 Subject: [PATCH] docs(1d_neighbours): Add documentation for single value case --- GeoSpatialTools/neighbours.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GeoSpatialTools/neighbours.py b/GeoSpatialTools/neighbours.py index 965fca6..c72c971 100644 --- a/GeoSpatialTools/neighbours.py +++ b/GeoSpatialTools/neighbours.py @@ -47,7 +47,7 @@ def find_nearest( List of values - this is the pool of values for which we are looking for a nearest match. This list MUST be sorted. Sortedness is not checked, nor is the list sorted. - test : list[Numeric] + test : list[Numeric] | Numeric List of query values check_sorted : bool Optionally check that the input vals is sorted. Raises an error if set @@ -56,7 +56,7 @@ def find_nearest( Returns ------- A list containing the index of the nearest neighbour in vals for each value - in test. + in test. Or the index of the nearest neighbour if test is a single value. """ if check_sorted: s = _check_sorted(vals) -- GitLab