Skip to content

Commit 7a31d1f

Browse files
committed
Fixed a couple of deprecations for recent numpy
1 parent 52ccbec commit 7a31d1f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

numpy_groupies/aggregate_numpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def _array(group_idx, a, size, fill_value, dtype=None):
194194
order_group_idx = np.argsort(group_idx, kind='mergesort')
195195
counts = np.bincount(group_idx, minlength=size)
196196
ret = np.split(a[order_group_idx], np.cumsum(counts)[:-1])
197-
ret = np.asanyarray(ret)
197+
ret = np.asanyarray(ret, dtype="object")
198198
if fill_value is None or np.isscalar(fill_value):
199199
_fill_untouched(group_idx, ret, fill_value)
200200
return ret

numpy_groupies/utils_numpy.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ def minimum_dtype_scalar(x, dtype, a):
9898

9999

100100
_forced_types = {
101-
'array': np.object,
102-
'all': np.bool_,
103-
'any': np.bool_,
104-
'nanall': np.bool_,
105-
'nanany': np.bool_,
101+
'array': object,
102+
'all': bool,
103+
'any': bool,
104+
'nanall': bool,
105+
'nanany': bool,
106106
'len': np.int64,
107107
'nanlen': np.int64,
108-
'allnan': np.bool_,
109-
'anynan': np.bool_,
108+
'allnan': bool,
109+
'anynan': bool,
110110
'argmax': np.int64,
111111
'argmin': np.int64,
112112
}

0 commit comments

Comments
 (0)