-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: sparse.csgraph simple examples. #8910
Conversation
I don't understand why Travis CI is failing. The log says:
When I run the test locally I have masked_array printed without commas separating elements in the array. In Numpy masked_array examples, masked_array is printed without commas: https://docs.scipy.org/doc/numpy/reference/maskedarray.generic.html |
That will depend on the numpy version you use I think. The documentation checker on TravisCI uses the latest version, so 1.14.4. In numpy 1.13.x-1.14.x there was quite a mess with array formatting changes. Just changing it in your example to the "Expected" format above should be fine. |
Thanks @peterSweter, these examples look good! |
Depends on numpy version, the tests use latest (1.14.4).
pe 8. kesäkuuta 2018 klo 13.05 Piotr Uchwat <notifications@github.com>
kirjoitti:
… I don't understand why Travis CI is failing. The log says:
Failed example:
csgraph_masked_from_dense(graph)
Expected:
masked_array(data =
[[-- 1 2 --]
[-- -- -- 1]
[-- -- -- 3]
[-- -- -- --]],
mask =
[[ True False False True]
[ True True True False]
[ True True True False]
[ True True True True]],
fill_value = 0)
Got:
masked_array(
data=[[--, 1, 2, --],
[--, --, --, 1],
[--, --, --, 3],
[--, --, --, --]],
mask=[[ True, False, False, True],
[ True, True, True, False],
[ True, True, True, False],
[ True, True, True, True]],
fill_value=0)
When I run the test locally I have masked_array printed without commas
separating elements in the array. In Numpy masked_array examples,
masked_array is printed without commas:
https://docs.scipy.org/doc/numpy/reference/maskedarray.generic.html
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8910 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AACI5qLLt3w4ipORPYHkb2dLLAQxxjTFks5t6kxFgaJpZM4UeLx3>
.
|
LGTM now, merging. Thanks @peterSweter |
I have created simple examples for the following sparse.csgraph functions:
sparse.csgraph (18)
connected_components
shortest_path
floyd_warshall
dijkstra
bellman_ford
johnson
breadth_first_order
depth_first_order
reverse_cuthill_mckee
maximum_bipartite_matching
structural_rank
construct_dist_matrix
reconstruct_path
csgraph_masked_from_dense
csgraph_from_dense
csgraph_from_masked
csgraph_to_dense
csgraph_to_masked