-
-
Save thm1118/f4e711e729a190e9fe68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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