| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| | |
|
| |
|
|
|
|
|
|
| |
* remove to/from_scipy_sparse_matrix
* skip geospatial example build
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
| |
* Use toarray instead of todense in test suite.
toarray is less ambiguous and forward-compatible.
* Rm isinstance target and use from_numpy_array.
np.matrix is a sublcass of ndarray so there is no need to
explicitly include it in the isinstance tuple.
|
| |
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
| |
* TST: Improve coverage of conversion module.
* WIP: Remove attr checks for graph/nodes?
* TST: remove to_dict_of_dict tests.
|
| | |
|
| | |
|
| |
|
|
| |
Better document edge_data behavior. Add examples.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
| |
* MAINT: use ABCs in conversion function.
Switch to using ABC-based isinstance checks in to_networkx_graph.
Note: order of execution matters - most general check must be last.
* DOC: Update docstring
|
| |
|
| |
Fixes #4002
|
| |
|
|
|
|
|
| |
* allow set of edge nodes
* clarify documentation
Fixes #3884
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
* converter node_attr_dict override fixed.
* tests and comments added.
|
| |
|
| |
Related to #1393
|
| |
|
|
|
|
|
|
|
|
| |
Found via `codespell -q 3 -I ../networkx-whitelist.txt` where whitelist consisted of:
```
ans
childs
iff
nd
te
```
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Fixes #2464.
Some related commits:
52eb3d3: from_pandas_dataframe and to_pandas_dataframe were added to work with adjacency matrix.
f0c22dd: from_pandas_dataframe was changed to work with edge-lists, but to_pandas_dataframe was not changed.
|
| |
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix call to `from_pandas_dataframe` from `to_networkx_graph`, fixes #2111
To make this clean, I decided to make `from_pandas_dataframe` only
require one argument by changing the signature from
```
def from_pandas_dataframe(df, source, target, edge_attr=None,
create_using=None):
```
to
```
def from_pandas_dataframe(df, source='source', target='target', edge_attr=None,
create_using=None):
```
I added additional tests and expanded a doctest.
* Skip tests if pandas not installed
* Fix docstring for `to_networkx_graph`
* Comply with pep8 and cleanup imports
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#2475)
* Dont assume iterators for nodes/edges/degrees (prep for views)
* Add graph view classes for nodes/edges/degree
* Add right set operations (not present in python3.3 KeysView
* Add nodes before adding edges so python36 tests work
By only adding edges, the nodes were added in order (0,1,3,2)
and with the ordered nature of python3.6 dicts the tests failed.
Could also fix by using nodelist on each call to to_convert_...
* weighted graph convert tests testing empty graphs
The edge iterator was exhausted for source before being used for dest
* allow DegreeView to include case of nbunch
* Make node/edge/degree properties of Graph
* View contains fix and Viewers can return self. More tests
* Add more tests including one for #2347
* Add nbunch tests and pep8
* Rename to EdgeView and EdgeDataView
* docs tweaks and pep8
* fix up nodeDataView contains. Add and clean up tests.
* Change the graph attributes to read-only properties
* Reframe views code and extend _node to all networkx (still need
examples)
* Clean up and pep8 for view changes
* ername AtlasViews, simplify code and add docstrings
* Make G[u] return a view, and catch some doc bugs
* Update views to use _node,_adj. Add len to EdgeDataView
* minor adjustments to example subclass/printgraph
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Dont assume iterators for nodes/edges/degrees (prep for views)
* Add graph view classes for nodes/edges/degree
* Add right set operations (not present in python3.3 KeysView
* Add nodes before adding edges so python36 tests work
By only adding edges, the nodes were added in order (0,1,3,2)
and with the ordered nature of python3.6 dicts the tests failed.
Could also fix by using nodelist on each call to to_convert_...
* weighted graph convert tests testing empty graphs
The edge iterator was exhausted for source before being used for dest
* allow DegreeView to include case of nbunch
* Make node/edge/degree properties of Graph
* View contains fix and Viewers can return self. More tests
* Add more tests including one for #2347
* Add nbunch tests and pep8
* Rename to EdgeView and EdgeDataView
* docs tweaks and pep8
* fix up nodeDataView contains. Add and clean up tests.
* Tweaks to improve speed for nodes and edges.
* improve views dependence on ABCs, remove len from dataviews
* First pass on docs in views.py
* Change property to lazy attribute
|
| | |
|
| |
|
|
|
|
|
| |
Since convert and convert_matrix both might be called upon to convert
graphs with non-string attributes, it was necessary to modify the code
so that the edge attributes are updated via the dict's built-in update
rather than simply passing the values as keyword arguments.
|
| |
|
|
|
|
|
|
| |
Now can use parameters ```x, y : nodes```.
It used to convert to ```y(x,) : nodes```
That conf.py change caused blank lines to give a warning so removed
them.
Misc word changes.
|
| | |
|
| |
|
|
|
|
| |
In convert.to_networkx_graph, we need to use
create_using.node.update() instead of creating a new dict
for the node atrributes. We were overwriting instead of updating.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
Fix tests that fail due to hash randomization
|
| | | |
|
| |\ \
| |/
|/| |
Subtle bug in floyd_warshall_numpy
|
| | | |
|
| | |
| |
| |
| | |
Also, allow custom multigraph_weight opertor functions.
|
| | |
| |
| |
| | |
For example, weight=lambda attrs: attrs.get('weight', 0).
|
| | | |
|
| | | |
|