def array_repr_oneline(array):
 r = np.array2string(array, separator=u',', suppress_small=True)
 return u' '.join((l.strip() for l in r.splitlines()))

def array_repr_oneline ( array ) : r = np . array2string ( array , separator = u',' , suppress_small = True ) return u' ' . join ( ( l . strip ( ) for l in r . splitlines ( ) ) )
represents a multi-dimensional numpy array flattened onto a single line .