Skip to content

Remove some numpy 1.6 workarounds #7494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 24, 2016
Next Next commit
Remove local definition of putmask
  • Loading branch information
dstansby committed Nov 21, 2016
commit 207edcfc5b9566162e92fcacb687626144b44db0
17 changes: 0 additions & 17 deletions lib/matplotlib/cbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -2582,23 +2582,6 @@ def get_label(y, default_name):
except AttributeError:
return default_name

# Numpy > 1.6.x deprecates putmask in favor of the new copyto.
# So long as we support versions 1.6.x and less, we need the
# following local version of putmask. We choose to make a
# local version of putmask rather than of copyto because the
# latter includes more functionality than the former. Therefore
# it is easy to make a local version that gives full putmask
# behavior, but duplicating the full copyto behavior would be
# more difficult.

try:
np.copyto
except AttributeError:
_putmask = np.putmask
else:
def _putmask(a, mask, values):
return np.copyto(a, values, where=mask)

_lockstr = """\
LOCKERROR: matplotlib is trying to acquire the lock
{!r}
Expand Down