IPython 8.4.0 Pypi GitHub Homepage
Other Docs
precision(self, s='')

Can set either integer precision or a format string.

If numpy has been imported and precision is an int, numpy display precision will also be set, via numpy.set_printoptions .

If no argument is given, defaults will be restored.

Set floating point precision for pretty printing.

Examples

In [1]: from math import pi

In [2]: %precision 3 Out[2]: u'%.3f'

In [3]: pi Out[3]: 3.142

In [4]: %precision %i Out[4]: u'%i'

In [5]: pi Out[5]: 3

In [6]: %precision %e Out[6]: u'%e'

In [7]: pi**10 Out[7]: 9.364805e+04

In [8]: %precision Out[8]: u'%r'

In [9]: pi**10 Out[9]: 93648.047476082982

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /IPython/core/magics/basic.py#517
type: <class 'function'>
Commit: