docs(convolution): fill docstring gaps and fix stale examples#3620
Open
brendancol wants to merge 1 commit into
Open
docs(convolution): fill docstring gaps and fix stale examples#3620brendancol wants to merge 1 commit into
brendancol wants to merge 1 commit into
Conversation
- custom_kernel: add Parameters/Returns/Examples (was a one-line stub) - convolve_2d: add a numpydoc docstring (had none) - convolution_2d: name all four supported backends in the agg param (Dask+CuPy was omitted) and fix 'to processed'/'CuPybacked' typos - annulus_kernel: correct example output to match numpy print (no commas, no stray trailing paren) - convolution_2d dask example: drop wrong dtype=float32 (float64 input is preserved); cupy type repr cupy.core.core.ndarray -> cupy.ndarray Docs only; no behavior change. test_convolution.py passes. Deep-sweep documentation sweep, module convolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation-only cleanup for
xrspatial/convolution.py, from the deep-sweep documentation pass. No behavior changes;test_convolution.pystill passes and flake8 is unchanged (one pre-existing F401 baseline).What changed
custom_kernel: replaced the one-line stub with a full numpydoc docstring (Parameters, Returns, Examples). The example output was run and matches.convolve_2d: added a docstring. It had none, even though it is importable and used by focal/edge_detection/morphology.convolution_2d: theaggparameter listed only NumPy, CuPy, and Dask+NumPy, but the dispatch also provides Dask+CuPy (_convolve_2d_dask_cupy). Now names all four. Also fixed the typos "values to processed" and "CuPybacked".annulus_kernel: the twoprint(kernel)example blocks showed comma-separated arrays with a stray trailing). Realprintoutput has no commas or paren. Corrected to the measured output (values were already right).convolution_2dDask example: the.compute()output claimeddtype=float32, but thenp.onesinput is float64 and stays float64. Dropped the wrong label.convolution_2dCuPy example:type(...)showedcupy.core.core.ndarray; modern CuPy reportscupy.ndarray. Updated.Not fixed (LOW, left as-is)
calc_cellsizekm example writes its output line as>>> (1000.0, 1000.0)(a stray prompt on an output line). Harmless on copy-paste, so left alone and noted in the sweep state.Verification
pytest xrspatial/tests/test_convolution.py-> 6 passed.