Commit ec6e57c5 authored by Joseph Siddons's avatar Joseph Siddons
Browse files

docs(1d_neighbours): Add documentation for single value case

parent 023ffa3e
...@@ -47,7 +47,7 @@ def find_nearest( ...@@ -47,7 +47,7 @@ def find_nearest(
List of values - this is the pool of values for which we are looking 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 for a nearest match. This list MUST be sorted. Sortedness is not
checked, nor is the list sorted. checked, nor is the list sorted.
test : list[Numeric] test : list[Numeric] | Numeric
List of query values List of query values
check_sorted : bool check_sorted : bool
Optionally check that the input vals is sorted. Raises an error if set Optionally check that the input vals is sorted. Raises an error if set
...@@ -56,7 +56,7 @@ def find_nearest( ...@@ -56,7 +56,7 @@ def find_nearest(
Returns Returns
------- -------
A list containing the index of the nearest neighbour in vals for each value 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: if check_sorted:
s = _check_sorted(vals) s = _check_sorted(vals)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment