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
Prev Previous commit
Next Next commit
Remove convert_to_string method
  • Loading branch information
dstansby committed Nov 21, 2016
commit 13c965db037151164039f5687af55f58d7a5d4fe
6 changes: 1 addition & 5 deletions lib/matplotlib/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ def __init__(self, seq):
self.offset_string = ''


def convert_to_string(value):
return np.asarray(value, dtype=str)[np.newaxis][0]


class UnitData(object):
# debatable makes sense to special code missing values
spdict = {'nan': -1.0, 'inf': -2.0, '-inf': -3.0}
Expand All @@ -90,7 +86,7 @@ def _set_seq_locs(self, data, value):
# np.unique makes dateframes work
new_s = [d for d in np.unique(strdata) if d not in self.seq]
for ns in new_s:
self.seq.append(convert_to_string(ns))
self.seq.append(ns)
if ns in UnitData.spdict.keys():
self.locs.append(UnitData.spdict[ns])
else:
Expand Down