scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
sum(self, axis=None, dtype=None, out=None)

Parameters

axis : {-2, -1, 0, 1, None} optional

Axis along which the sum is computed. The default is to compute the sum of all the matrix elements, returning a scalar (i.e., :None:None:`axis` = :None:None:`None`).

dtype : dtype, optional

The type of the returned matrix and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used.

versionadded
out : np.matrix, optional

Alternative output matrix in which to place the result. It must have the same shape as the expected output, but the type of the output values will be cast if necessary.

versionadded

Returns

sum_along_axis : np.matrix

A matrix with the same shape as :None:None:`self`, with the specified axis removed.

Sum the matrix elements over a given axis.

See Also

numpy.matrix.sum

NumPy's implementation of 'sum' for matrices

Examples

See :

Back References

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

scipy.sparse.csgraph._matching.min_weight_full_bipartite_matching

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/_compressed.py#599
type: <class 'function'>
Commit: