From 8c9d5fcb797a7289f2f9f3a74cfde7b2c6bbab06 2021-04-10 21:39:47 From: Peter Corke Date: 2021-04-10 21:39:47 Subject: [PATCH] update formatting as per PR tests --- diff --git a/IPython/core/formatters.py b/IPython/core/formatters.py index 33a99f6..ab8172e 100644 --- a/IPython/core/formatters.py +++ b/IPython/core/formatters.py @@ -678,9 +678,10 @@ class PlainTextFormatter(BaseFormatter): d = pretty._type_pprinters.copy() d[float] = lambda obj,p,cycle: p.text(self.float_format%obj) # if NumPy is used, set precision for its float64 type - if 'numpy' in sys.modules: + if "numpy" in sys.modules: import numpy - d[numpy.float64] = lambda obj,p,cycle: p.text(self.float_format%obj) + + d[numpy.float64] = lambda obj, p, cycle: p.text(self.float_format % obj) return d @default('deferred_printers')