How to change default number of digits printed for PrettyPrint

freedomjin
Mon, 20 May 2024 01:52:36 +0000
New to Julia

Hi,
I found PrettyPrint.jl quite handy when printing complex data structures, however, for large nested structures, pprint attempts to show all Float values to maximum precision and often overflows entire screen.

Is it possible to set default precision to, say, 4 digits? I tried to add kw args such as precision=4, digits=4, ".4f%", etc., none of them worked.

Moreover, sometimes it is best to suppress values of struct fields as they may contain arrays. Is it possible to only pprint field names and their types of the input struct?

Thanks in advance.

3 posts - 3 participants