DOC: Clarify behavior of sparse.csgraph.dijkstra
for directed=False
#20509
Labels
Documentation
Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org
scipy.sparse.csgraph
Issue with current documentation:
https://scipy.github.io/devdocs/reference/generated/scipy.sparse.csgraph.dijkstra.html#scipy.sparse.csgraph.dijkstra
I've used
sparse.csgraph.dijkstra
(and visited this page) many times; today was the first time I noticed the note which says:I find this behavior quite unexpected - I understand not wanting to do a check for symmetry and warn the user at every input to this function, but it still seems worth advertising this content more prominently.
Also, to clarify, does this imply that if
csgraph[i,j] = x
(x nonzero) andcsgraph[j,i] = 0
, thencsgraph[j,i] = 0
is implicitly treated as having valuex
ifdirected=False
?Idea or request for content:
I suggest putting some warning about this behavior under the
directed
kwarg description, even if it just points users to the Notes section for more information.I would be happy to draft a PR for this if people support it.
Additional context (e.g. screenshots, GIFs)
No response
The text was updated successfully, but these errors were encountered: