class_docstr: Magics that provide central IPython functionality.
  
  These are various magics that don't fit into specific categories but that
  are all part of the base 'IPython experience'.
docstr: Set floating point precision for pretty printing.
  
  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.
  
  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
code: def precision(self, s=""):
      """Set floating point precision for pretty printing.
  
      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.
  
      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
      """
      ptformatter = self.shell.display_formatter.formatters[
          "text/plain"
      ]
      ptformatter.float_precision = s
      return ptformatter.float_format
  
imports: from __future__ import print_function
  from __future__ import absolute_import
  import argparse
  import io
  import sys
  from pprint import pformat
  from IPython.core import magic_arguments, page
  from IPython.core.error import UsageError
  from IPython.core.magic import Magics, magics_class, line_magic, magic_escapes
  from IPython.utils.text import format_screen, dedent, indent
  from IPython.testing.skipdoctest import skip_doctest
  from IPython.utils.ipstruct import Struct
  from IPython.utils.py3compat import unicode_type
  from warnings import warn
  from logging import error
label_desc: Use image node_id 13 for calling the BasicMagics obj's underlying member method code with example usage: obj.precision(s) and returns: ptformatter