Show More
@@ -678,9 +678,10 b' class PlainTextFormatter(BaseFormatter):' | |||
|
678 | 678 | d = pretty._type_pprinters.copy() |
|
679 | 679 | d[float] = lambda obj,p,cycle: p.text(self.float_format%obj) |
|
680 | 680 | # if NumPy is used, set precision for its float64 type |
|
681 |
if |
|
|
681 | if "numpy" in sys.modules: | |
|
682 | 682 | import numpy |
|
683 | d[numpy.float64] = lambda obj,p,cycle: p.text(self.float_format%obj) | |
|
683 | ||
|
684 | d[numpy.float64] = lambda obj, p, cycle: p.text(self.float_format % obj) | |
|
684 | 685 | return d |
|
685 | 686 | |
|
686 | 687 | @default('deferred_printers') |
General Comments 0
You need to be logged in to leave comments.
Login now