| 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
| |
* Remove deprecated function nx.info
* remove functions from TOC
* replace print(nx.info(G)) with print(G) in example
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
| |
|
|
|
| |
Rm to_numpy_matrix and from_numpy_matrix and related tests
Co-authored-by: dtuncturk <dilaramemis@sabanciuniv.edu>
|
| |
|
|
|
|
|
| |
* Rm reminder from 3.0 deprecations list.
* Rm to_numpy_recarray filter warning from conftest.
* Deprecate to_numpy_recarray.
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Adding more examples of to_numpy_array method's usage
* Run black for auto-formatting
* Fixing a minor typo in the example
* Fixing a minor typo in the example
* Converting nonedge value to float in the example
* Changed nonedge to -1. & update example to match PEP 8
|
| | |
|
| |
|
|
|
| |
* Deprecate to_numpy_recarray.
* Add release note.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add basic test for supporting multi-attr adjacency.
* WIP: sloppy implementation of multiattr adjacency in to_numpy_array.
Conditionals could be improved.
* Reorg conditionals.
* Test to_numpy_array raises with structured dtype for multigraphs.
* Fix default value handling for structured types.
* Add tests for dtypes with single field.
* Parametrize field tests for directed/undirected inputs.
* Handle ambiguous case: structured dtype + specified weight.
* Add test for multiple fields that may/not have corresponding edge attrs.
* Updated docstring.
* Add tests with nonedge values + structured dtypes.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WIP: try approach based on advanced indexing.
* WIP: Fix some tests and support multigraphs.
* Rm test for limiting reductions to nanfunctions.
* Catch edgeless graph cornercase.
* Cleanups.
* Update networkx/convert_matrix.py
Comments from review
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Only subgraph if necessary
and copy if so, for performance reasons
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Split multigraph and graph cases for performance.
* Add tests for to_numpy_array with complex dtype.
Co-authored-by: Andras Deak <deak.andris@gmail.com>
* Add test for object weights.
* Add test for more multiweight reduction functions.
Include arbitrary functions beyond the original set of
nanmin, nanmax, and nansum.
* Update docstring.
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Andras Deak <deak.andris@gmail.com>
|
| |
|
|
|
|
|
| |
* Switch to DeprecationWarning.
* Add tests and docs for scipy_sparse_matrix deps.
* Update release notes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop Py37
* XML serialization issue
* Use math.comb
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
* Run pyupgrade --py38-plus
* Run black
* More documentation
* Deprecate euclidean
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
|
| |
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
| |
Use `!r` to trigger string repr with auto quote handling
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update docstring for from_pandas_edgelist
Fixes #4106
Add edge_key parameter to to_pandas_edgelist, add docs and tests
Add the deprecation cruft to change args of to_pandas_edgelist
add back parameter "order"
add line to deprecations.html to remind to remove.
add line in deprecations to remind to change keyword args to * syntax
add line explaining 2-release cycle for deprecations
order columns for pytest
* address comments
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* DEP: Deprecate to/from_numpy_matrix.
Move implementation of from_numpy_matrix to
from_numpy_array.
* TST: Add tests and warnings filters for deprecations.
* DOC: Add deprecation notes.
* STY: fix autofmt'd lines in conftest.
* MAINT: apply suggestions from code review.
|
| | |
|
| |
|
|
|
| |
Report name, number of nodes, and number of edges of a graph.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
| |
* handle nodelist better in convert_numpy and convert_scipy
* allow to_numpy_array to handle graphs with no nodes
* improve nodelist handling
* Add description to release_dev.rst
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
| |
Fixes #4106
|
| |
|
|
|
| |
Refactors algorithms that had used to_numpy_matrix in their
implementation to use to_numpy_array instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Replace references of numpy.matrix with array.
* Several docstrings in convert_matrix incorrectly referred to
NumPy matrices. Adds appropriate description of return types
* "matrix" -> "adjacency matrix" in some docstring Notes
sections to prevent confusion with the NumPy matrix object.
* References to to_numpy_matrix in docstrings replaced with
to_numpy_array.
* rm see also ref to from_numpy_matrix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* enabled feature presented in #4065, to customise key of a multigraph when using from_pandas_edgelist. Also found small doc issue in multigraph that i corrected
* refactored
* added unit tests
* refactor
* PEP8 linting corrections
* added back docstring making build fail
* inlined code and added docstring example
* added docstring correction
* added line continuation to docstring test
* added AtlasView to docstring output
* added AtlasView to docstring output
* final clearup
* make one-line error message (seems ok for black)
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
| |
* fix bug for to_scipy_sparse_matrix function
* Add test of selfloops in convert_scipy
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pd.DataFrame) (#3935)
* Added exception raise if source or target column name already exists as edge attributes when converting to pandas edgelist
* Added exception raise if source or target column name already exists as edge attributes when converting to pandas edgelist
* Fixed tests not asserting properly
* Separate test for default and custom case, shortened exception text, made graph creation in test more efficient
* Take the chance to update some other PEP8 issues in these modules.
* tweak comment line
Co-authored-by: iboates <isaac.boates@eifer.uni-karlsruhe.de>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
| |
Fixes #3867
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Fixes #3562
|
| |
|
|
|
|
|
|
|
|
| |
Fixes #3605
* Replaced is with == and minor pycodestyle fixes
* Changed exception style as per feedback
* Implementing code feedback
|