8000 BUG: Use np.integer instead of int, to allow unsigned integers · matplotlib/matplotlib@7b8883c · GitHub
[go: up one dir, main page]

Skip to content

Commit 7b8883c

Browse files
committed
BUG: Use np.integer instead of int, to allow unsigned integers
Additionally, make the fixes needed to avoid an incoming deprecation in numpy/numpy#9505
1 parent c9612cc commit 7b8883c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/mlab.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3136,17 +3136,17 @@ def get_type(item, atype=int):
31363136
def get_justify(colname, column, precision):
31373137
ntype = column.dtype
31383138

3139-
if np.issubdtype(ntype, str) or np.issubdtype(ntype, bytes):
3139+
if np.issubdtype(ntype, np.character):
31403140
fixed_width = int(ntype.str[2:])
31413141
length = max(len(colname), fixed_width)
31423142
return 0, length+padding, "%s" # left justify
31433143

3144-
if np.issubdtype(ntype, int):
3144+
if np.issubdtype(ntype, np.integer):
31453145
length = max(len(colname),
31463146
np.max(list(map(len, list(map(str, column))))))
31473147
return 1, length+padding, "%d" # right justify
31483148

3149-
if np.issubdtype(ntype, float):
3149+
if np.issubdtype(ntype, np.floating):
31503150
fmt = "%." + str(precision) + "f"
31513151
length = max(
31523152
len(colname),

0 commit comments

Comments
 (0)
0