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 ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Module « scipy.stats.mstats »

Fonction find_repeats - module scipy.stats.mstats

Signature de la fonction find_repeats

def find_repeats(arr) 

Description

help(scipy.stats.mstats.find_repeats)

Find repeats in arr and return a tuple (repeats, repeat_count).

The input is cast to float64. Masked values are discarded.

Parameters
----------
arr : sequence
    Input array. The array is flattened if it is not 1D.

Returns
-------
repeats : ndarray
    Array of repeated values.
counts : ndarray
    Array of counts.

Examples
--------
>>> from scipy.stats import mstats
>>> mstats.find_repeats([2, 1, 2, 3, 2, 2, 5])
(array([2.]), array([4]))

In the above example, 2 repeats 4 times.

>>> mstats.find_repeats([[10, 20, 1, 2], [5, 5, 4, 4]])
(array([4., 5.]), array([2, 2]))

In the above example, both 4 and 5 repeat 2 times.



Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé