Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé
Module « numpy.matlib »

Fonction zeros - module numpy.matlib

Signature de la fonction zeros

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

Description

help(numpy.matlib.zeros)

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

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.

See Also
--------
numpy.zeros : Equivalent array function.
matlib.ones : Return a matrix of ones.

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

Examples
--------
>>> import numpy.matlib
>>> np.matlib.zeros((2, 3))
matrix([[0.,  0.,  0.],
        [0.,  0.,  0.]])

>>> np.matlib.zeros(2)
matrix([[0.,  0.]])



Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé