8000 Change Inf/NaN to inf/nan · matplotlib/matplotlib@1328bee · GitHub
[go: up one dir, main page]

Skip to content

Commit 1328bee

Browse files
committed
Change Inf/NaN to inf/nan
1 parent bf9a451 commit 1328bee

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ def test_pcolorargs():
13091309
ax.pcolormesh(x, y, Z[:-1, :-1], shading="gouraud")
13101310
with pytest.raises(TypeError):
13111311
ax.pcolormesh(X, Y, Z[:-1, :-1], shading="gouraud")
1312-
x[0] = np.NaN
1312+
x[0] = np.nan
13131313
with pytest.raises(ValueError):
13141314
ax.pcolormesh(x, y, Z[:-1, :-1])
13151315
with np.errstate(invalid='ignore'):
@@ -6921,7 +6921,7 @@ def test_spines_properbbox_after_zoom():
69216921
def test_gettightbbox_ignore_nan():
69226922
fig, ax = plt.subplots()
69236923
remove_ticks_and_titles(fig)
6924-
ax.text(np.NaN, 1, 'Boo')
6924+
ax.text(np.nan, 1, 'Boo')
69256925
renderer = fig.canvas.get_renderer()
69266926
np.testing.assert_allclose(ax.get_tightbbox(renderer).width, 496)
69276927

lib/matplotlib/tests/test_colors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def test_BoundaryNorm():
283283

284284
# Masked arrays
285285
boundaries = [0, 1.1, 2.2]
286-
vals = np.ma.masked_invalid([-1., np.NaN, 0, 1.4, 9])
286+
vals = np.ma.masked_invalid([-1., np.nan, 0, 1.4, 9])
287287

288288
# Without interpolation
289289
ncolors = len(boundaries) - 1
@@ -297,9 +297,9 @@ def test_BoundaryNorm():
297297
assert_array_equal(bn(vals), expected)
298298

299299
# Non-trivial masked arrays
300-
vals = np.ma.masked_invalid([np.Inf, np.NaN])
300+
vals = np.ma.masked_invalid([np.inf, np.nan])
301301
assert np.all(bn(vals).mask)
302-
vals = np.ma.masked_invalid([np.Inf])
302+
vals = np.ma.masked_invalid([np.inf])
303303
assert np.all(bn(vals).mask)
304304

305305
# Incompatible extend and clip

lib/matplotlib/tests/test_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ def test_rgba_antialias():
13471347
aa[:, int(N/2):] = a[:, int(N/2):]
13481348

13491349
# set some over/unders and NaNs
1350-
aa[20:50, 20:50] = np.NaN
1350+
aa[20:50, 20:50] = np.nan
13511351
aa[70:90, 70:90] = 1e6
13521352
aa[70:90, 20:30] = -1e6
13531353
aa[70:90, 195:215] = 1e6

0 commit comments

Comments
 (0)
0