| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lint and fix using ruff
* add flake8-pie lints
* remove useless import alias
* bump version
* bump deps
---------
Co-authored-by: daniel.eades <daniel.eades@hotmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add/remove_edges_from. (#6268)
* doc for add_edges_from
* doc for digraph
* doc for multigraph
* multigraph.add_nodes_from returns keylist
* update docs for graph - edges
* doc update: graph.add_nodes_from
* doc update: graph.remove_nodes_from
* doc update: graph.add_edges_from
* doc update: rewording for graph.add_edges_from
* doc update: graph.add_weighted_edges_from rewording
* doc update: digraph updated as graph
* doc update: digraph minor sync
* doc update: multigraph same as graph
* Update graph.py
* Update digraph.py
* Update multigraph.py
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use scipy.sparse array datastructure
* Add reminder to rm wrapper when scipy adds creation fns.
* Rm mention of np matrix from code comment.
* Update networkx/algorithms/bipartite/matrix.py
Co-authored-by: Stefan van der Walt <sjvdwalt@gmail.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Stefan van der Walt <sjvdwalt@gmail.com>
|
| |
|
| |
Move factory attributes to the class instead of instance. ?speedup?
|
| |
|
|
|
|
| |
Removes the deprecated OrderedGraph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* Update MG docstring to reflect rm_edges_from behavior.
Also adds example.
* Update remove_edge docstring in MG and MDG.
* Fix MDG examples.
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| |
|
|
| |
* Make all graph properties cached properties
* one test function is not needed due to test inheritance
|
| |
|
|
|
|
| |
Fix the return type and description for the `degree` method in the
docstrings of all the graph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Updated MultiDiGraph documentation to include more examples of actually
using parallel edges, and fixed references to things like G[u, v] where
G[u, v, k] is required for a MultiDigraph. Have not made parallel
changes in MultiGraph which should maybe also be made?
Docs tests pass on my end; no code outside of comments was changed.
-Peter Mawhorter
* Updated docs for MultiGraph to add more multigraph-specific examples and
fix a few places where untested examples were wrong.
-Peter Mawhorter
* [DOC] fix typo
* add the right amount of separators
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| |
|
|
|
| |
* Fix missing backticks
* one more backticks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix return type in docstring of internal function.
* Rm explicit mention of numpy matrix from class docstrings.
* Fix return type of floyd_warshall_numpy docstring.
* Remove mention of numpy matrix from code comment.
* Fix simrank similarity internal docstring.
* Rm explicit mention of matrix in favor of 2D array.
* Update to_networkx_graph array exception wording.
* Remove extraneous mention of numpy matrix.
* Don't print array in exception message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
| |
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.
|
| |
|
|
|
|
|
| |
* Raise ValueError if None is added as a node.
Removed some tests that checked that errors raised when None was a node.
* update tutorial to make a stronger statement about None
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add special processing of `multigraph_input` upon graph init
Fixes: #4720
Adding a keyword argument `multigraph_input=True`
to a graph construction call should treat any incoming input data for
the graph as a dict-of-dict-of-dict multigraph data structure.
Previously the multigraph_input argument would be added to the graph
attribute dict and ignored when processing the input data.
* Change default and add tests
* make default try mgi=True, and if fails try mgi=False
* copy parameter docstring to main class
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add a test to catch importing aliases.
* Add test for another bad import pattern.
* Fix one bad import pattern.
Adds __all__ to some modules where it was missing.
* RM networkx namespace test.
|
| | |
|
| |
|
|
|
|
|
| |
* Setup for numpydoc.
* Add to doc requirements.
* Replace napoleon with numpydoc in conf.py.
* DOC: Fixups from numpydoc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Format code w/ black
* Format docstrings w/ black
* Manual cleanup
* Tell pytest to ignore planned deprecations
* Don't call plt.show during testing
* Another known deprecation
* DOC: rm duplicate line from docstring example
* Minor cleanup
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* MultiGraph from graphml with explicit edge ids #3470
Prior this commit, a graph with explicit edge ids
but no parallel edges stored in a graphml was converted to
a Graph and the edge ids were moved to the edge data.
This behaviour has been removed.
* clean up multigraph handling in read_graphml and friends
Added changes to parse_graphml too.
multigraph returned when parallel edges exist in file or when
new argument "force_multigraph" is True
* test parse_graphml and edge_key_type better and cleanup
* more tests
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
find -name "*py" | xargs grep -n '" % '
find -name "*py" | xargs grep -n '"\.format('
find -name "*py" | xargs grep -n "' %"
find -name "*py" | xargs grep -n 'msg % '
find -name "*py" | xargs grep -n ' %d '
find -name "*py" | xargs grep -n '\.format('
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
* Fixed problem in documentation view of this function
* Replacing `Return` to `Returns` in function docs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #3204
* implemented node_attr_dict_factory and graph_attr_dict_factory.
* documentation added.
fixed test errors.
* implemented attr factory for all classes.
from add_edges_from and add_nodes_from removed duplicate code.
from copy removed useless dict copying.
* fixed tests errors.
* fixed tests errors in all graphs.
* ValueError fixed.
potential add_nodes_from usage error fixed.
* typo fixed.
* review fixes:
* Leave the assignments which move the class variables that hold factories to instance variables.
* Leave the node checking with self._succ and self._adj.
* Leave the code that adds the node in add_nodes_from rather than pushing it to add_node.
* Leave the code to add edges in add_edges_from rather than off-loading to add_edge.
* Leave the code in copy unchanged.
for multidigraph add_edges_from implemented
for multigraph add_edges_from don't use add_edges
* typo fixed.
* leave copy as is
* removed all fixes for next PR.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Simplify the Graphview and SubGraphView system
- add tests to show that extensions of base graph classes (only add new functions)
should be able to use the Graph.subgraph and Graph.copy methods easily
- Remove ReadOnlyGraph class in favor of existing freeze() function
- Switch all GraphView classes to generic_graph_view function
- Switch all SubGraph classes to subgraph_view function
- Introduce deprecated functions that act like the deprecated classes.
Still need to:
- add docs
- add tests
- make sure backward compatible and marked as deprecated
- remove GraphView and SubGraph construct from rest of codebase
- update release docs
Fixes #2889
Fixes #2793
Fixes #2796
Fixes #2741
* Ease subclassing for to_(un)directed
- add to_directed_class indicator functions to base classes
- start deprecating G.fresh_copy
- update function.to(un)directed
* Remove G.fresh_copy from code replace with __class__
Add deprecation warnings for GraphView classes, ReverseView and
SubGraph. Also for fresh_copy function.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update docs for G.copy and set_*_attributes.
Fixes #2899 and #2859
* fix tutorial and docs of to_*directed
Fixes #2849
* fix docs for asyn_fluidc
Fixes #2845
* Allow seed to change in connected_watts_strogatz_graph
Also update docs. Fixes #2809
* Add tests for exceptions to asyn_fluidc
* Add tests for random graphs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* speedup of filters for induced subgraph
Check if induced node set is big or small to determine lookup method.
Also add subgraph docs to warn that building the subgraph from scratch
may be better and give alternate code to use for this.
Fixes #2887
* Add tests of subgraph filter objects
* propagate subgraph doc changes to all base classes
|
| |
|
|
|
|
|
|
| |
* Remove a second cyclic reference in G.root_graph
Related to #3011 and #2885 and maybe #2793
* Add tests for memory leaks due to copy()
|
| |
|
|
|
|
| |
Graphs no longer have references to views.
Views still have references to the graph.
This should ease subclassing the base graph classes
because you don't have to worry about creating memory leaks.
|
| |
|
|
|
|
|
|
|
|
| |
Found via `codespell -q 3 -I ../networkx-whitelist.txt` where whitelist consisted of:
```
ans
childs
iff
nd
te
```
|
| | |
|
| |
|
|
|
|
|
| |
I didn't change functions defined in tests.
I also left drawing routines as is at least for now.
Addresses #1582
Fixes #1583
|
| |
|
| |
As suggested by @mddddd in #2728
|
| |
|
|
|
| |
Fixes #2743
Addresses #2716
Relates to #2687
|
| |
|
|
|
|
| |
* Fix links
* Comply with pep8
|
| |
|
|
|
| |
Fixes #2648
Noticed hidden errors with G.name in operators.py
|
| |
|
|
|
|
|
|
|
|
| |
* Revamp tutorial.rst
* update docs and simpliy nbunch usage
* Revise base class docs
* Read-through and tweak rst files
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Shortcut chains of subgraph views in common cases.
Turns out the general case of chains of subgraph views is
hard to make a shortcut for. So this only does the common
case of node induced subgraphs of subgraphs.
* Add tests for subgraph chains
* Add more tests of chains of subgraphs
|
| | |
|
| |
|
| |
Fixes #1208
|
| |
|
|
|
|
|
|
|
|
| |
* move selfloop methods out of graph classes into function.py
* replace G.node with G.nodes. fix Pickle of views
* Replace G.edge with G.edges
* Add a few lines of docs for release realted to this PR.
|