def _shape_repr(shape):
 if (len(shape) == 0):
  return '()'
 joined = ', '.join((('%d' % e) for e in shape))
 if (len(shape) == 1):
  joined += ','
 return ('(%s)' % joined)

def _shape_repr ( shape ) : if ( len ( shape ) == 0 ) : return '()' joined = ', ' . join ( ( ( '%d' % e ) for e in shape ) ) if ( len ( shape ) == 1 ) : joined += ',' return ( '(%s)' % joined )
return a platform independent representation of an array shape under python 2 .