Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Remove type onp.bool.
Browse files Browse the repository at this point in the history
- `np.bool` was a deprecated alias for the builtin `bool` with version 1.20.
  • Loading branch information
abdullahselek committed Aug 21, 2023
1 parent b84609d commit 2e36e61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion python/mxnet/numpy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
int8 = onp.dtype(onp.int8)
int64 = onp.dtype(onp.int64)
bool_ = onp.dtype(onp.bool_)
bool = onp.dtype(onp.bool)
int16 = onp.dtype(onp.int16)
uint16 = onp.dtype(onp.uint16)
uint32 = onp.dtype(onp.uint32)
Expand Down
4 changes: 2 additions & 2 deletions tests/python/unittest/test_numpy_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -2094,7 +2094,7 @@ def forward(self, a, mask, value):
if test_data.size == 0:
break
valid_num = int(mx_mask.asnumpy().sum())
np_mask = mx_mask.asnumpy().astype(onp.bool)
np_mask = mx_mask.asnumpy().astype(onp.bool_)
vshape = []
vshape_broadcast = []
for i in range(len(dshape)):
Expand Down Expand Up @@ -5587,7 +5587,7 @@ def forward(self, a):
for shape in shapes:
for axis in [None] + [i for i in range(0, len(shape))]:
for otype in [None, onp.int32, onp.int64]:
for itype in [onp.bool, onp.int8, onp.int32, onp.int64]:
for itype in [onp.bool_, onp.int8, onp.int32, onp.int64]:
x = rand_ndarray(shape).astype(itype).as_np_ndarray()
np_out = onp.cumsum(x.asnumpy(), axis=axis, dtype=otype)
mx_out = np.cumsum(x, axis=axis, dtype=otype)
Expand Down

0 comments on commit 2e36e61

Please sign in to comment.