##// END OF EJS Templates
Merge pull request #12902 from petercorke/master...
Matthias Bussonnier -
r26469:67d4444c merge
parent child Browse files
Show More
@@ -636,7 +636,6 b' class PlainTextFormatter(BaseFormatter):'
636 636
637 637 This parameter can be set via the '%precision' magic.
638 638 """
639
640 639 new = change['new']
641 640 if '%' in new:
642 641 # got explicit format string
@@ -678,6 +677,11 b' class PlainTextFormatter(BaseFormatter):'
678 677 def _type_printers_default(self):
679 678 d = pretty._type_pprinters.copy()
680 679 d[float] = lambda obj,p,cycle: p.text(self.float_format%obj)
680 # if NumPy is used, set precision for its float64 type
681 if "numpy" in sys.modules:
682 import numpy
683
684 d[numpy.float64] = lambda obj, p, cycle: p.text(self.float_format % obj)
681 685 return d
682 686
683 687 @default('deferred_printers')
General Comments 0
You need to be logged in to leave comments. Login now