Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a78d61f commit e740588Copy full SHA for e740588
1 file changed
lib/matplotlib/backends/backend_pdf.py
@@ -112,7 +112,7 @@ def pdfRepr(obj):
112
# need to use %f with some precision. Perhaps the precision
113
# should adapt to the magnitude of the number?
114
elif isinstance(obj, float):
115
- if npy.isnan(obj) or obj in (-npy.inf, npy.inf):
+ if not npy.isfinite(obj):
116
raise ValueError, "Can only output finite numbers in PDF"
117
r = "%.10f" % obj
118
return r.rstrip('0').rstrip('.')
0 commit comments