[Numpy-discussion] Number of digits
David Douard
david.douard at logilab.fr
Mon Jul 10 09:09:07 EDT 2006
On Mon, Jul 10, 2006 at 02:33:52PM +0200, Nils Wagner wrote:
> Hi all,
>
> how can I increase the number of digits in the output of str(.) ?
>
> >>> lam**2
> 493.48022005446808
> >>> str(lam**2)
> '493.480220054'
>
> '493.4802200544680' would be fine.
Maybe something like
>>> '%.13f'%(lam**2)
David
--
David Douard LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian : http://www.logilab.fr/formations
Développement logiciel sur mesure : http://www.logilab.fr/services
Informatique scientifique : http://www.logilab.fr/science
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20060710/78b991b9/attachment-0001.sig>
More information about the NumPy-Discussion
mailing list