| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
* Keep the original order of the nodes in bipartite_layout
* Keep the original order of the nodes in bipartite_layout
|
| | |
|
| | |
|
| |
|
|
|
| |
* Fix_Typos
* Commit_Suggestions
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added arf_layout
* reference to docstring and comparison to spring layout
* rebase to origin main
* black re-format
* Left aligned docstring text
* Cleaned up computation and update variables to new docstring
* Updated naming tests. Added input check on arf_layout parameter `a`
* Fixed Linter issues for py38 target
* Fixed Linter issues for target p38
* linter issue fixed
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add test for sorted layers.
* Implement layer sorting when possible.
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Add test case for non-sortable layers.
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
|
| |
* Remove redundant float conversion
* Remove redundant int conversion
* Use integer division
Co-authored-by: Miroslav Šedivý <6774676+eumiro@users.noreply.github.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added references
* added gallery example
* fixed error
* fixed error
* Update networkx/drawing/layout.py
Co-authored-by: Mridul Seth <mail@mriduls.com>
* Update networkx/drawing/layout.py
Co-authored-by: Mridul Seth <mail@mriduls.com>
* added example on edge cover
* Revert "added example on edge cover"
This reverts commit 27a7277622a45e361a60ddfc1b04b6b18acd6900.
* add a link break
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| |
|
|
|
|
|
| |
* CI: sync up black dev requirements version with precommit
* Run black
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| |
|
|
|
| |
Fixes positioning of first node when equidistant=True.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Step 1: use sparse arrays in nx.to_scipy_sparse_matrix.
Seems like a reasonable place to start.
nx.to_scipy_sparse_matrix is one of the primary interfaces to
scipy.sparse from within NetworkX.
* 1: Use np.outer instead of mult col/row vectors
Fix two instances in modularitymatrix where a new 2D array was being
created via an outer product of two \"vectors\".
In the matrix case, this was a row vector \* a column vector. In the
array case this can be disambiguated by being explicit with np.outer.
* Update _transition_matrix in laplacianmatrix module
- A few instances of matrix multiplication operator
- Add np.newaxis + transpose to get shape right for broadcasting
- Explicitly convert e.g. sp.sparse.spdiags to a csr_array.
* Update directed_combinitorial_laplacian w/ sparse array.
- Wrap spdiags in csr_array and update matmul operators.
* Rm matrix-specific code from lgc and hmn modules
- Replace .A call with appropriate array semantics
- wrap sparse.diags in csr_array.
* Change hits to use sparse array semantics.
- Replace * with @
- Remove superfluous calls to flatten.
* Update sparse matrix usage in layout module.
- Simplify lil.getrowview call
- Wrap spdiags in csr_array.
* lil_matrix -> lil_array in graphmatrix.py.
* WIP: Start working on algebraic connectivity module.
* Incorporate auth mat varname feedback.
* Revert 1D slice and comment for 1D sparse future.
* Add TODOs: rm csr_array wrapper around spdiags etc.
* WIP: cleanup algebraicconn: tracemin_fiedler.
* Typo.
* Finish reviewing algebraicconnectivity.
* Convert bethe_hessian matrix to use sparse arrays.
* WIP: update laplacian.
Update undirected laplacian functions.
* WIP: laplacian - add comment about _transition_matrix return types.
* Finish laplacianmatrix review.
* Update attrmatrix.
* Switch to official laplacian function.
* Update pagerank to use sparse array.
* Switch bipartite matrix to sparse arrays.
* Check from_scipy_sparse_matrix works with arrays.
Modifies test suite.
* Apply changes from review.
* Fix failing docstring tests.
* Fix missing axis for in-place multiplication.
* Use scipy==1.8rc2
* Use matrix multiplication
* Fix PyPy CI
* [MRG] Create plot_subgraphs.py example (#5165)
* Create plot_subgraphs.py
https://github.com/networkx/networkx/issues/4220
* Update plot_subgraphs.py
black
* Update plot_subgraphs.py
lint plus font_size
* Update plot_subgraphs.py
added more plots
* Update plot_subgraphs.py
removed plots from the unit test and added comments
* Update plot_subgraphs.py
lint
* Update plot_subgraphs.py
typos fixed
* Update plot_subgraphs.py
added nodes to the plot of the edges removed that was commented out for whatever reason
* Update plot_subgraphs.py
revert the latest commit - the line was commented out for a reason - it's broken
* Update plot_subgraphs.py
fixed node color issue
* Update plot_subgraphs.py
format fix
* Update plot_subgraphs.py
forgot to draw the nodes... now fixed
* Fix sphinx warnings about heading length.
* Update examples/algorithms/plot_subgraphs.py
* Update examples/algorithms/plot_subgraphs.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Add traveling salesman problem to example gallery (#4874)
Adds an example of the using Christofides to solve the TSP problem to the example galery.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Fixed inconsistent documentation for nbunch parameter in DiGraph.edges() (#5037)
* Fixed inconsistent documentation for nbunch parameter in DiGraph.edges()
* Resolved Requested Changes
* Revert changes to degree docstrings.
* Update comments in example.
* Apply wording to edges method in all graph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Compatibility updates from testing with numpy/scipy/pytest rc's (#5226)
* Rm deprecated scipy subpkg access.
* Use recwarn fixture in place of deprecated pytest pattern.
* Rm unnecessary try/except from tests.
* Replace internal `close` fn with `math.isclose`. (#5224)
* Replace internal close fn with math.isclose.
* Fix lines in docstring examples.
* Fix Python 3.10 deprecation warning w/ int div. (#5231)
* Touchups and suggestions for subgraph gallery example (#5225)
* Simplify construction of G with edges rm'd
* Rm unused graph attribute.
* Shorten categorization by node type.
* Simplify node coloring.
* Simplify isomorphism check.
* Rm unit test.
* Rm redundant plotting of each subgraph.
* Use new package name (#5234)
* Allowing None edges in weight function of bidirectional Dijkstra (#5232)
* added following feature also to bidirectional dijkstra: The weight function can be used to hide edges by returning None.
* changed syntax for better readability and code duplicate avoidance
Co-authored-by: Hohmann, Nikolas <nikolas.hohmann@tu-darmstadt.de>
* Add an FAQ about assigning issues. (#5182)
* Add FAQ about assigning issues.
* Add note about linking issues from new PRs.
* Update dev deps (#5243)
* Update minor doc issues with tex notation (#5244)
* Add FutureWarnings to fns that return sparse matrices
- biadjacency_matrix.
- bethe_hessian_matrix.
- incidence_matrix.
- laplacian functions.
- modularity_matrix functions.
- adjacency_matrix.
* Add to_scipy_sparse_array and use it everywhere.
Add a new conversion function to preserve array semantics internally
while not altering behavior for users.
Also adds FutureWarning to to_scipy_sparse_matrix.
* Add from_scipy_sparse_array. Supercedes from_scipy_sparse_matrix.
* Handle deprecations in separate PR.
* Fix docstring examples.
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
Co-authored-by: Andrew Knyazev <andrew.knyazev@ucdenver.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: eskountis <56514439+eskountis@users.noreply.github.com>
Co-authored-by: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com>
Co-authored-by: NikHoh <nikhoh@web.de>
Co-authored-by: Hohmann, Nikolas <nikolas.hohmann@tu-darmstadt.de>
Co-authored-by: Sultan Orazbayev <contact@econpoint.com>
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| |
|
|
|
|
|
| |
* Rm deprecated scipy subpkg access.
* Use recwarn fixture in place of deprecated pytest pattern.
* Rm unnecessary try/except from tests.
|
| |
|
|
|
|
|
| |
* Use array ops for distance calculation.
Removes for-loops and matmul.
* Refactor spiral layout equidist to use arrays.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add minimal mypy configuration file.
* Add mypy workflow to GH.
* Properly import sentinels from traversal.edgedfs.
* mypy doesn't like variables named \"e\".
* Rm annotations from single function.
* Fix name collisions in test suite.
Make sure all tests have unique names.
* Rm unused random seed in test setup.
* Rm redundant __all__ specification.
* Silence mypy error from sum(). Mypy bug?
* Fix tsp test instantiation nit.
* \"type: ignore\" to suppress conditional fn sigature errors.
* Remaining \"type: ignore\" to appease mypy.
* Configure mypy to ignore inheritance issues.
* Update exclude conf for CI.
- Add yaml
- Reformat regex containing reportviews
* Rm partial annotations from lukes.py.
Fixes mypy errors due to unannotated code.
* Reorg defaultdict to reduce type: ignore cruft.
* Homogenize signatures for fns defined in conditionals.
* err as varname only in exception catching.
* Fix name collision in Bellman-Ford test suite.
|
| |
|
|
|
|
|
|
|
| |
* fixed bug in multipartite_layout so subset labels can be non-numeric
* Added non-numeric partition label test to test_multipartite_layout.
* moved multipartite non-numeric partition label test outside of main test class
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
| |
A more descriptive variable name for exceptions. This reduces local var naming conflicts when
\`e\` is used e.g. to represent edges as a loop variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rescale_layout_dict (#5091)
* changed tuple to np.array
* changed return to zip
* modified unittest to match rescale_layout_dict return type
* modified doctest rescale_layout_dict
* added import statement to doctest; test pass
* Add release note about change in return type.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Reorganize aliases and deprecate random_state.
* Rm internal uses of random_state.
* Update tests.
Rm tests or rename to use np_random_state.
* Update reference guide.
* Update deprecations.rst.
* Remove preserve_random_state from refguide.
* Add deprecation to release notes.
|
| |
|
|
|
|
|
| |
* spring_layout: ignore 'fixed' nodes not in the graph nodes
* add api change to release notes
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| |
|
| |
Reduce duplication in source code
|
| |
|
|
|
|
|
| |
* Setup for numpydoc.
* Add to doc requirements.
* Replace napoleon with numpydoc in conf.py.
* DOC: Fixups from numpydoc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Standardize pytest imports
* Standardize numpy/scipy imports
* Document import style
* Fix
* More
* Fix matplotlib imports
* Revert changes to tests
* Motivate import policy
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Fix missed imports
* Standard np.testing use
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
| |
|
|
| |
merge #3146 which came from unknown repository
closes #3146
|
| |
|
| |
Remove duplicated Parameters section in docstring
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Implemented multipartite_layout
* Added test.
* Remove left over `max_layer` in multipartite_layout
* Multipartite Layout Example
* Update examples/drawing/plot_multipartite_graph.py
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* Remove unused imports
* remove more unused import statements found by pyflakes
* move import of random outside of networkx.utils
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* fixed high-dimensional initializer for kamada_kawai_layout (networkx #3658)
* added tests for kamada_kawai 3d
* increased test coverage of kamada_kawai_layout
* fixed empty-graph oversight in kamada_kawai_layout
* removed unused variable vpos from smoke tests
Fixes #3658
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Fix scaling of single node shells in shall_layout
Also add a feature: rotation of initial angle for each shell
controlled by new argument "rotate"
Add a test to check this fix
Update for PEP8
* apease the codecov check
Fixes #3753
|
| |
|
|
|
|
|
|
|
| |
The copyright and author stuff is not necessary, out-of-date,
and inconsistent. It takes up visual space and is a pain to
police everyone doing the same thing on the top of the module.
Git handles authorship in a comprehensive and authoritative way.
The LICENSE.txt file applies to all project code.
|
| | |
|
| |
|
| |
Thanks for the great library! Here's a little typo fix.
|
| | |
|
| | |
|
| |
|
|
| |
Fixes #3188
also fix some pycodestyle
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Fixes #3498 Adds docs to BFS and DFS functions referring to each other
* Fixes #3463 to add warning to closeness centrality
* Fixes #3469 by adding a link to the miles datafile.
* Fixes #3489 allowing scale=None and adding docs
* Fixes #3473 by adding example to migration_guide_from_1.x_to_2.0.rst
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add spiral layout for graph drawing
New method in layout will arrange nodes of a graph in a spiral layout
with variable compactness. Nodes may be positioned with equal angles
(increasing separation further from center), or equidistant (decreasing
angle further from center)
* Add sprial_layout to __all__ for import
* Import numpy direct to spiral_layout
* unit tests and small tweaks
* spiral layout documentation
|
| |
|
|
|
|
|
|
|
| |
* Make spring_layout raise exception if fixed nodes specified and no pos-dict specified
* Check that any fixed nodes have specified positions in input pos-dict
Note: spring_layout is also fruchterman_reingold_layout.
Before this, fixed nodes not in the pos-dict were assigned random positions.
|
| | |
|
| |
|
|
|
|
|
|
| |
Implements a method that assigns each node in a planar graph a position such that its edges do not intersect.
Co-authored-by: David Kraeutmann <kane@kane.cx>
Co-authored-by: Johannes Schulte <johannes.bernhard.schulte@rwth-aachen.de>
Co-authored-by: Yassin Bahloul <yassin.bahloul@rwth-aachen.de>
Co-authored-by: Dominik Meier <dominik.meier@rwth-aachen.de>
|
| |
|
|
|
|
| |
* Fixed problem in documentation view of this function
* Replacing `Return` to `Returns` in function docs
|
| |
|
|
|
|
|
| |
* Added documentation for spectral layout (#2971)
* Refined documentation for spectral layout (#2971)
Fixes #2971
|
| | |
|