original_docstring: formatArray is designed for two modes of operation:
  
      1. Full output
  
      2. Summarized output
  
      
docstring: formatArray is designed for two modes of operation:
  1. Full output
  
  2. Summarized output
docstring_tokens: formatArray is designed for two modes of operation : 1 . Full output 2 . Summarized output
code: def _formatArray(a, format_function, rank, max_line_len,
                   next_line_prefix, separator, edge_items, summary_insert):
      """formatArray is designed for two modes of operation:
  
      1. Full output
  
      2. Summarized output
  
      """
      if rank == 0:
          return format_function(a[()]) + '\n'
  
      if summary_insert and 2*edge_items < len(a):
          leading_items = edge_items
          trailing_items = edge_items
          summary_insert1 = summary_insert + separator
      else:
          leading_items = 0
          trailing_items = len(a)
          summary_insert1 = ""
  
      if rank == 1:
          s = ""
          line = next_line_prefix
          for i in range(leading_items):
              word = format_function(a[i]) + separator
              s, line = _extendLine(s, line, word, max_line_len, next_line_prefix)
  
          if summary_insert1:
              s, line = _extendLine(s, line, summary_insert1, max_line_len, next_line_prefix)
  
          for i in range(trailing_items, 1, -1):
              word = format_function(a[-i]) + separator
              s, line = _extendLine(s, line, word, max_line_len, next_line_prefix)
  
          word = format_function(a[-1])
          s, line = _extendLine(s, line, word, max_line_len, next_line_prefix)
          s += line + "]\n"
          s = '[' + s[len(next_line_prefix):]
      else:
          s = '['
          sep = separator.rstrip()
          for i in range(leading_items):
              if i > 0:
                  s += next_line_prefix
              s += _formatArray(a[i], format_function, rank-1, max_line_len,
                                " " + next_line_prefix, separator, edge_items,
                                summary_insert)
              s = s.rstrip() + sep.rstrip() + '\n'*max(rank-1, 1)
  
          if summary_insert1:
              s += next_line_prefix + summary_insert1 + "\n"
  
          for i in range(trailing_items, 1, -1):
              if leading_items or i != trailing_items:
                  s += next_line_prefix
              s += _formatArray(a[-i], format_function, rank-1, max_line_len,
                                " " + next_line_prefix, separator, edge_items,
                                summary_insert)
              s = s.rstrip() + sep.rstrip() + '\n'*max(rank-1, 1)
          if leading_items or trailing_items > 1:
              s += next_line_prefix
          s += _formatArray(a[-1], format_function, rank-1, max_line_len,
                            " " + next_line_prefix, separator, edge_items,
                            summary_insert).rstrip()+']\n'
      return s
code_tokens: def _formatArray ( a , format_function , rank , max_line_len , next_line_prefix , separator , edge_items , summary_insert ) : if rank == 0 : return format_function ( a [ ( ) ] ) + '\n' if summary_insert and 2 * edge_items < len ( a ) : leading_items = edge_items trailing_items = edge_items summary_insert1 = summary_insert + separator else : leading_items = 0 trailing_items = len ( a ) summary_insert1 = "" if rank == 1 : s = "" line = next_line_prefix for i in range ( leading_items ) : word = format_function ( a [ i ] ) + separator s , line = _extendLine ( s , line , word , max_line_len , next_line_prefix ) if summary_insert1 : s , line = _extendLine ( s , line , summary_insert1 , max_line_len , next_line_prefix ) for i in range ( trailing_items , 1 , - 1 ) : word = format_function ( a [ - i ] ) + separator s , line = _extendLine ( s , line , word , max_line_len , next_line_prefix ) word = format_function ( a [ - 1 ] ) s , line = _extendLine ( s , line , word , max_line_len , next_line_prefix ) s += line + "]\n" s = '[' + s [ len ( next_line_prefix ) : ] else : s = '[' sep = separator . rstrip ( ) for i in range ( leading_items ) : if i > 0 : s += next_line_prefix s += _formatArray ( a [ i ] , format_function , rank - 1 , max_line_len , " " + next_line_prefix , separator , edge_items , summary_insert ) s = s . rstrip ( ) + sep . rstrip ( ) + '\n' * max ( rank - 1 , 1 ) if summary_insert1 : s += next_line_prefix + summary_insert1 + "\n" for i in range ( trailing_items , 1 , - 1 ) : if leading_items or i != trailing_items : s += next_line_prefix s += _formatArray ( a [ - i ] , format_function , rank - 1 , max_line_len , " " + next_line_prefix , separator , edge_items , summary_insert ) s = s . rstrip ( ) + sep . rstrip ( ) + '\n' * max ( rank - 1 , 1 ) if leading_items or trailing_items > 1 : s += next_line_prefix s += _formatArray ( a [ - 1 ] , format_function , rank - 1 , max_line_len , " " + next_line_prefix , separator , edge_items , summary_insert ) . rstrip ( ) + ']\n' return s
short_docstring: formatArray is designed for two modes of operation:
  1.
short_docstring_tokens: formatArray is designed for two modes of operation : 1 .
comment: """formatArray is designed for two modes of operation:
  
      1. Full output
  
      2. Summarized output
  
      """