Skip to content

Instantly share code, notes, and snippets.

@thm1118
Forked from ccorcos/gist:11197543
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thm1118/f4e711e729a190e9fe68 to your computer and use it in GitHub Desktop.
Save thm1118/f4e711e729a190e9fe68 to your computer and use it in GitHub Desktop.
from pylab import *
from pprint import pprint
def arrayToList(arr):
if type(arr) == type(array([])):
return arrayToList(arr.tolist())
elif type(arr) == type([]):
return [arrayToList(a) for a in arr]
else:
return '{:.2f}'.format(arr)
def prettyArray(arr):
pprint(arrayToList(arr), width=800)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment