HI Boyd,

You want the variables $PDL::doubleformat and their ilk, described in PDL::Core 
section VARIABLES.

pdl> p $c = sequence(10)/3
[0 0.33333333 0.66666667 1  1.3333333  1.6666667 2  2.3333333  2.6666667 3]
pdl> p $PDL::doubleformat
%10.8g
pdl> $PDL::doubleformat='%4.2g'

pdl> p $c
[0 0.33 0.67 1  1.3  1.7 2  2.3  2.7 3]

Derek

> On Feb 4, 2020, at 7:00 AM, Boyd Duffee <[email protected]> wrote:
> 
> Hi all,
> 
> I'm wondering if there's a "pretty print" function in the perldl shell that I 
> haven't found in the docs.  Right now printing a piddle with "p" gives me 6 
> decimal places where I'd just like 1 or 2 for brevity.
> 
> If I was writing a full-blown script, would you be directing me to swcols to 
> customize the ouput format?  I'm looking around for examples.
> 
> thanks,
> -- 
> Boyd Duffee
>    Bring on a brand-new renaissance - TTH
> _______________________________________________
> pdl-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pdl-general



_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to