#NEWLINE# def _shape_repr( shape ) : #NEWLINE# #INDENT# "Return a platform independent reprensentation of an array shape\n    Under Python 2, the `long` type introduces an 'L' suffix when using the\n    default %r format for tuples of integers (typically used to store the shape\n    of an array).\n    Under Windows 64 bit (and Python 2), the `long` type is used by default\n    in numpy shapes even when the integer dimensions are well below 32 bit.\n    The platform specific type causes string messages or doctests to change\n    from one platform to another which is not desirable.\n    Under Python 3, there is no more `long` type so the `L` suffix is never\n    introduced in string representation.\n    >>> _shape_repr((1, 2))\n    '(1, 2)'\n    >>> one = 2 ** 64 / 2 ** 64  # force an upcast to `long` under Python 2\n    >>> _shape_repr((one, 2 * one))\n    '(1, 2)'\n    >>> _shape_repr((1,))\n    '(1,)'\n    >>> _shape_repr(())\n    '()'\n    " #NEWLINE# if ( len ( shape ) == 0 ) : #NEWLINE# #INDENT# return '()' #NEWLINE# #UNINDENT# joined = ', ' . join ( ( ( '%d' % e ) for e in e ) ) #NEWLINE# if ( len ( shape ) == 1 ) : #NEWLINE# #INDENT# joined += ',' #NEWLINE# #UNINDENT# return ( '(%s)' % joined )