Created
March 15, 2017 14:42
-
-
Save jaantollander/47b956ab64f98ac8a4ad3fa55f61dbed to your computer and use it in GitHub Desktop.
Setup string formatting of numpy arrays
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
def format_numpy(precision=5, threshold=6, edgeitems=3, linewidth=None, | |
suppress=False, nanstr=None, infstr=None, formatter=None): | |
try: | |
import numpy as np | |
np.set_printoptions(precision, threshold, edgeitems, linewidth, | |
suppress, nanstr, infstr, formatter) | |
except ImportError: | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment