Description
cost_distance is public (exported in xrspatial/__init__.py, listed on docs/source/reference/proximity.rst) but its docstring is missing two things the rest of the proximity family has.
There's no Examples section. The module has no >>> blocks at all, so the rendered API page shows no runnable usage. The other functions on the proximity reference page (proximity, allocation, direction) each end with a .. sourcecode:: python example.
The docstring also never says which backends work. The code dispatches to numpy, cupy, dask+numpy, and dask+cupy, and all four have tests in xrspatial/tests/test_cost_distance.py. proximity/allocation/direction each state "supports NumPy, CuPy, Dask with NumPy, and Dask with CuPy backed xarray DataArray", pinned by test_docstring_states_all_backends (added for #3091). cost_distance has neither the sentence nor a pin.
Proposed change
Doc-only: add an Examples block and a backend-support paragraph to the cost_distance docstring, plus a pin test modeled on the one in test_proximity.py. No behavior changes.
Description
cost_distanceis public (exported inxrspatial/__init__.py, listed ondocs/source/reference/proximity.rst) but its docstring is missing two things the rest of the proximity family has.There's no Examples section. The module has no
>>>blocks at all, so the rendered API page shows no runnable usage. The other functions on the proximity reference page (proximity,allocation,direction) each end with a.. sourcecode:: pythonexample.The docstring also never says which backends work. The code dispatches to numpy, cupy, dask+numpy, and dask+cupy, and all four have tests in
xrspatial/tests/test_cost_distance.py.proximity/allocation/directioneach state "supports NumPy, CuPy, Dask with NumPy, and Dask with CuPy backed xarray DataArray", pinned bytest_docstring_states_all_backends(added for #3091).cost_distancehas neither the sentence nor a pin.Proposed change
Doc-only: add an Examples block and a backend-support paragraph to the
cost_distancedocstring, plus a pin test modeled on the one intest_proximity.py. No behavior changes.