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 :

Module « numpy »

Classe « ufunc »

Informations générales

Héritage

builtins.object
    ufunc

Définition

class ufunc(builtins.object):

Description [extrait de ufunc.__doc__]

Functions that operate element by element on whole arrays.

    To see the documentation for a specific ufunc, use `info`.  For
    example, ``np.info(np.sin)``.  Because ufuncs are written in C
    (for speed) and linked into Python with NumPy's ufunc facility,
    Python's help() function finds this page whenever help() is called
    on a ufunc.

    A detailed explanation of ufuncs can be found in the docs for :ref:`ufuncs`.

    **Calling ufuncs:** ``op(*x[, out], where=True, **kwargs)``

    Apply `op` to the arguments `*x` elementwise, broadcasting the arguments.

    The broadcasting rules are:

    * Dimensions of length 1 may be prepended to either array.
    * Arrays may be repeated along dimensions of length 1.

    Parameters
    ----------
    *x : array_like
        Input arrays.
    out : ndarray, None, or tuple of ndarray and None, optional
        Alternate array object(s) in which to put the result; if provided, it
        must have a shape that the inputs broadcast to. A tuple of arrays
        (possible only as a keyword argument) must have length equal to the
        number of outputs; use None for uninitialized outputs to be
        allocated by the ufunc.
    where : array_like, optional
        This condition is broadcast over the input. At locations where the
        condition is True, the `out` array will be set to the ufunc result.
        Elsewhere, the `out` array will retain its original value.
        Note that if an uninitialized `out` array is created via the default
        ``out=None``, locations within it where the condition is False will
        remain uninitialized.
    **kwargs
        For other keyword-only arguments, see the :ref:`ufunc docs <ufuncs.kwargs>`.

    Returns
    -------
    r : ndarray or tuple of ndarray
        `r` will have the shape that the arrays in `x` broadcast to; if `out` is
        provided, it will be returned. If not, `r` will be allocated and
        may contain uninitialized values. If the function has more than one
        output, then the result will be a tuple of arrays.

Liste des attributs statiques

Nom de l'attribut Valeur
identity<attribute 'identity' of 'numpy.ufunc' objects>
nargs<attribute 'nargs' of 'numpy.ufunc' objects>
nin<attribute 'nin' of 'numpy.ufunc' objects>
nout<attribute 'nout' of 'numpy.ufunc' objects>
ntypes<attribute 'ntypes' of 'numpy.ufunc' objects>
signature<attribute 'signature' of 'numpy.ufunc' objects>
types<attribute 'types' of 'numpy.ufunc' objects>

Liste des opérateurs

Opérateurs hérités de la classe object

__eq__, __ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
__call__(self, /, *args, **kwargs) Call self as a function. [extrait de __call__.__doc__]
__repr__(self) Return repr(self). [extrait de __repr__.__doc__]
__str__(self) Return str(self). [extrait de __str__.__doc__]
accumulate accumulate(array, axis=0, dtype=None, out=None) [extrait de accumulate.__doc__]
at at(a, indices, b=None, /) [extrait de at.__doc__]
outer outer(A, B, /, **kwargs) [extrait de outer.__doc__]
reduce reduce(array, axis=0, dtype=None, out=None, keepdims=False, initial=<no value>, where=True) [extrait de reduce.__doc__]
reduceat reduceat(array, indices, axis=0, dtype=None, out=None) [extrait de reduceat.__doc__]

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __hash__, __init_subclass__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__