parameters: (*args)
return_statement: return output
docstring: 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.row_stack` has identical behavior, but is called with a sequence
      of sequences.
docstring_summary: Constructs a 2D array from a group of sequences.
docstring_tokens: Constructs a 2D array from a group of sequences .
function: def argstoarray(*args):
      """
      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.row_stack` has identical behavior, but is called with a sequence
      of sequences.
  
      """
      if len(args) == 1 and not isinstance(args[0], ndarray):
          output = ma.asarray(args[0])
          if output.ndim != 2:
              raise ValueError("The input should be 2D")
      else:
          n = len(args)
          m = max([len(k) for k in args])
          output = ma.array(np.empty((n,m), dtype=float), mask=True)
          for (k,v) in enumerate(args):
              output[k,:len(v)] = v
  
      output[np.logical_not(np.isfinite(output._data))] = masked
      return output
function_tokens: def argstoarray ( * args ) : if len ( args ) == 1 and not isinstance ( args [ 0 ] , ndarray ) : output = ma . asarray ( args [ 0 ] ) if output . ndim != 2 : raise ValueError ( "The input should be 2D" ) else : n = len ( args ) m = max ( [ len ( k ) for k in args ] ) output = ma . array ( np . empty ( ( n , m ) , dtype = float ) , mask = True ) for ( k , v ) in enumerate ( args ) : output [ k , : len ( v ) ] = v output [ np . logical_not ( np . isfinite ( output . _data ) ) ] = masked return output