[SciPy-user] Format numbers as with Matlab format command ?

Nils Wagner nwagner@iam.uni-stuttgart...
Tue Oct 16 15:07:14 CDT 2007


On Tue, 16 Oct 2007 13:01:19 -0700
  Reckoner <reckoner@gmail.com> wrote:
> Matlab has a "format" command which will format the 
>displayed numbers to
> show a fixed
> precision or  number of digits. Does Ipython/scipy have 
>anything similar?
> 
>For example, in Matlab,
> 
> » format compact
> » pi
> ans =
>    3.1416
> » format long
> » pi
> ans =
>   3.14159265358979

set_printoptions(precision=None, threshold=None, 
edgeitems=None, linewidth=None,
  suppress=None, nanstr=None, infstr=None)
  

Nils


More information about the SciPy-user mailing list