Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4cc759d

Browse files
committed
Fix bug in pdf backend (numpy.inf not numpy.infinity)
svn path=/trunk/matplotlib/; revision=3619
1 parent 424c79d commit 4cc759d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/backends/backend_pdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def pdfRepr(obj):
112112
# need to use %f with some precision. Perhaps the precision
113113
# should adapt to the magnitude of the number?
114114
elif isinstance(obj, float):
115-
if npy.isnan(obj) or obj in (-npy.infinity, npy.infinity):
115+
if npy.isnan(obj) or obj in (-npy.inf, npy.inf):
116116
raise ValueError, "Can only output finite numbers in PDF"
117117
r = "%.10f" % obj
118118
return r.rstrip('0').rstrip('.')

0 commit comments

Comments
 (0)