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 fondamentaux
Voir le programme détaillé
Module « scipy.stats.mstats »

Fonction argstoarray - module scipy.stats.mstats

Signature de la fonction argstoarray

def argstoarray(*args) 

Description

help(scipy.stats.mstats.argstoarray)

Constructs a 2D array from a group of sequences.

Sequences are filled with missing values to match the length of the longest
sequence.

Parameters
----------
*args : sequences
    Group of sequences.

Returns
-------
argstoarray : MaskedArray
    A ( `m` x `n` ) masked array, where `m` is the number of arguments and
    `n` the length of the longest argument.

Notes
-----
`numpy.ma.vstack` has identical behavior, but is called with a sequence
of sequences.

Examples
--------
A 2D masked array constructed from a group of sequences is returned.

>>> from scipy.stats.mstats import argstoarray
>>> argstoarray([1, 2, 3], [4, 5, 6])
masked_array(
 data=[[1.0, 2.0, 3.0],
       [4.0, 5.0, 6.0]],
 mask=[[False, False, False],
       [False, False, False]],
 fill_value=1e+20)

The returned masked array filled with missing values when the lengths of
sequences are different.

>>> argstoarray([1, 3], [4, 5, 6])
masked_array(
 data=[[1.0, 3.0, --],
       [4.0, 5.0, 6.0]],
 mask=[[False, False,  True],
       [False, False, False]],
 fill_value=1e+20)



Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé