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

Skip to content

Commit e48e356

Browse files
committed
Allow for numpy 1.04, which does not have ma.masked_invalid
svn path=/trunk/matplotlib/; revision=5065
1 parent 048668b commit e48e356

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/matplotlib/transforms.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,10 @@ def update_from_data_xy(self, xy, ignore=None):
693693

694694
if len(xy) == 0:
695695
return
696-
xym = ma.masked_invalid(xy)
696+
try:
697+
xym = ma.masked_invalid(xy) # maybe add copy=False
698+
except AttributeError: # masked_invalid not exposed in npy 1.04
699+
xym = ma.masked_where(~npy.isfinite(xy), xy)
697700
if (xym.count(axis=1)!=2).all():
698701
return
699702

0 commit comments

Comments
 (0)