numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersBackRef
matrix(data, dtype=None, copy=True)

Returns a matrix from an array-like object, or from a string of data. A matrix is a specialized 2-D array that retains its 2-D nature through operations. It has certain special operators, such as * (matrix multiplication) and ** (matrix power).

Parameters

data : array_like or string

If :None:None:`data` is a string, it is interpreted as a matrix with commas or spaces separating columns, and semicolons separating rows.

dtype : data-type

Data-type of the output matrix.

copy : bool

If :None:None:`data` is already an ndarray , then this flag determines whether the data is copied (the default), or whether a view is constructed.

note

algebra. Instead use regular arrays. The class may be removed in the future.

See Also

array

Examples

>>> a = np.matrix('1 2; 3 4')
... a matrix([[1, 2], [3, 4]])
>>> np.matrix([[1, 2], [3, 4]])
matrix([[1, 2],
        [3, 4]])
See :

Back References

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

numpy.matrixlib.defmatrix.matrix.max scipy.sparse._base.spmatrix.todense numpy.matrixlib.defmatrix.matrix.argmin numpy.asmatrix numpy.matrixlib.defmatrix.matrix.ptp numpy.diagonal numpy.matrixlib.defmatrix.matrix.min networkx.linalg.modularitymatrix.modularity_matrix numpy.matrixlib.defmatrix.matrix.prod numpy.matrixlib.defmatrix.matrix.var numpy.matrixlib.defmatrix.matrix.sum numpy.matrixlib.defmatrix.matrix.all numpy.linalg.pinv numpy.matrixlib.defmatrix.matrix.std numpy.linalg.qr numpy.matrixlib.defmatrix.matrix.mean networkx.linalg.modularitymatrix.directed_modularity_matrix numpy.matrixlib.defmatrix.matrix.argmax

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 : /numpy/__init__.py#None
type: <class 'type'>
Commit: