parameters: (ary, order='C', always_copy=True)
docstring: Return a copy of the array collapsed into one dimension.
  
      Parameters
      ----------
      ary : array_like
          Array from which to retrieve the flattened data from.
      order : {'C', 'F', 'A', 'K'}, optional
          'C' means to flatten in row-major (C-style) order.
          'F' means to flatten in column-major (Fortran-
          style) order. 'A' means to flatten in column-major
          order if `a` is Fortran *contiguous* in memory,
          row-major order otherwise. 'K' means to flatten
          `a` in the order the elements occur in memory.
          The default is 'C'.
      always_copy : boolean
          When False, a copy is only made when necessary
  
      Returns
      -------
      y : ndarray
          A copy of the input array, flattened to one dimension.
  
      Notes
      -----
      The order of the data in memory is always row-major (C-style).
  
      Examples
      --------
      >>> a = np.array([[1,2], [3,4]])
      >>> np.flatten(a)
      array([1, 2, 3, 4])
docstring_summary: Return a copy of the array collapsed into one dimension.
docstring_tokens: Return a copy of the array collapsed into one dimension .
function: def flatten(ary, order='C', always_copy=True):
      """
      Return a copy of the array collapsed into one dimension.
  
      Parameters
      ----------
      ary : array_like
          Array from which to retrieve the flattened data from.
      order : {'C', 'F', 'A', 'K'}, optional
          'C' means to flatten in row-major (C-style) order.
          'F' means to flatten in column-major (Fortran-
          style) order. 'A' means to flatten in column-major
          order if `a` is Fortran *contiguous* in memory,
          row-major order otherwise. 'K' means to flatten
          `a` in the order the elements occur in memory.
          The default is 'C'.
      always_copy : boolean
          When False, a copy is only made when necessary
  
      Returns
      -------
      y : ndarray
          A copy of the input array, flattened to one dimension.
  
      Notes
      -----
      The order of the data in memory is always row-major (C-style).
  
      Examples
      --------
      >>> a = np.array([[1,2], [3,4]])
      >>> np.flatten(a)
      array([1, 2, 3, 4])
      """
  
      if order == 'F' or (order == 'A' and not ary.flags['F_CONTIGUOUS']):
          ary = numpy.transpose(ary)
  
      ret = ary.reshape(_util.totalsize(ary))
      if always_copy:
          return ret.copy()
      else:
          return ret
function_tokens: def flatten ( ary , order = 'C' , always_copy = True ) : if order == 'F' or ( order == 'A' and not ary . flags [ 'F_CONTIGUOUS' ] ) : ary = numpy . transpose ( ary ) ret = ary . reshape ( _util . totalsize ( ary ) ) if always_copy : return ret . copy ( ) else : return ret