scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
todense(self, order=None, out=None)

Parameters

order : {'C', 'F'}, optional

Whether to store multi-dimensional data in C (row-major) or Fortran (column-major) order in memory. The default is 'None', which provides no ordering guarantees. Cannot be specified in conjunction with the :None:None:`out` argument.

out : ndarray, 2-D, optional

If specified, uses this array (or numpy.matrix ) as the output buffer instead of allocating a new array to return. The provided array must have the same shape and dtype as the sparse matrix on which you are calling the method.

Returns

arr : numpy.matrix, 2-D

A NumPy matrix object with the same shape and containing the same data represented by the sparse matrix, with the requested memory order. If :None:None:`out` was passed and was an array (rather than a numpy.matrix ), it will be filled with the appropriate values and returned wrapped in a numpy.matrix object that shares the same memory.

Return a dense matrix representation of this matrix.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

networkx.convert_matrix.to_scipy_sparse_matrix scipy.sparse.csgraph._tools.reconstruct_path

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/sparse/_base.py#906
type: <class 'function'>
Commit: