def set_printoptions(precision=None, threshold=None, edgeitems=None, linewidth=None, profile=None):
 if (profile is not None):
  if (profile == 'default'):
   PRINT_OPTS.precision = 4
   PRINT_OPTS.threshold = 1000
   PRINT_OPTS.edgeitems = 3
   PRINT_OPTS.linewidth = 80
  elif (profile == 'short'):
   PRINT_OPTS.precision = 2
   PRINT_OPTS.threshold = 1000
   PRINT_OPTS.edgeitems = 2
   PRINT_OPTS.linewidth = 80
  elif (profile == 'full'):
   PRINT_OPTS.precision = 4
   PRINT_OPTS.threshold = float('inf')
   PRINT_OPTS.edgeitems = 3
   PRINT_OPTS.linewidth = 80
 if (precision is not None):
  PRINT_OPTS.precision = precision
 if (threshold is not None):
  PRINT_OPTS.threshold = threshold
 if (edgeitems is not None):
  PRINT_OPTS.edgeitems = edgeitems
 if (linewidth is not None):
  PRINT_OPTS.linewidth = linewidth

def set_printoptions ( precision = None , threshold = None , edgeitems = None , linewidth = None , profile = None ) : if ( profile is not None ) : if ( profile == 'default' ) : PRINT_OPTS . precision = 4 PRINT_OPTS . threshold = 1000 PRINT_OPTS . edgeitems = 3 PRINT_OPTS . linewidth = 80 elif ( profile == 'short' ) : PRINT_OPTS . precision = 2 PRINT_OPTS . threshold = 1000 PRINT_OPTS . edgeitems = 2 PRINT_OPTS . linewidth = 80 elif ( profile == 'full' ) : PRINT_OPTS . precision = 4 PRINT_OPTS . threshold = float ( 'inf' ) PRINT_OPTS . edgeitems = 3 PRINT_OPTS . linewidth = 80 if ( precision is not None ) : PRINT_OPTS . precision = precision if ( threshold is not None ) : PRINT_OPTS . threshold = threshold if ( edgeitems is not None ) : PRINT_OPTS . edgeitems = edgeitems if ( linewidth is not None ) : PRINT_OPTS . linewidth = linewidth
set options for printing .