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 ? Programmation Python
Les compléments
Voir le programme détaillé
Module « scipy.special »

Fonction round - module scipy.special

Signature de la fonction round

def round(*args, **kwargs) 

Description

help(scipy.special.round)

round(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])

round(x, out=None)

Round to the nearest integer.

Returns the nearest integer to `x`.  If `x` ends in 0.5 exactly,
the nearest even integer is chosen.

Parameters
----------
x : array_like
    Real valued input.
out : ndarray, optional
    Optional output array for the function results.

Returns
-------
scalar or ndarray
    The nearest integers to the elements of `x`. The result is of
    floating type, not integer type.

Examples
--------
>>> import scipy.special as sc

It rounds to even.

>>> sc.round([0.5, 1.5])
array([0., 2.])


Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé