Loading [MathJax]/extensions/tex2jax.js
numpy 1.24.3 Pypi GitHub Homepage
Other Docs

NotesParametersReturns
zeros(shape, dtype=None, order='C')

Notes

If shape has length one i.e. (N,), or is a scalar N, out becomes a single row matrix of shape (1,N).

Parameters

shape : int or sequence of ints

Shape of the matrix

dtype : data-type, optional

The desired data-type for the matrix, default is float.

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

Whether to store the result in C- or Fortran-contiguous order, default is 'C'.

Returns

out : matrix

Zero matrix of given shape, dtype, and order.

Return a matrix of given shape and type, filled with zeros.

See Also

matlib.ones

Return a matrix of ones.

numpy.zeros

Equivalent array function.

Examples

import numpy.matlib
np.matlib.zeros((2, 3))
np.matlib.zeros(2)
See :

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.

matlib.onesonesnumpy.zeroszeros

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