Skip to content
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

convert np.bool to np.bool_ #1359

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pcdet/datasets/augmentor/augmentor_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def one_hot(x, num_class=1):

def points_in_pyramids_mask(points, pyramids):
pyramids = pyramids.reshape(-1, 5, 3)
flags = np.zeros((points.shape[0], pyramids.shape[0]), dtype=np.bool)
flags = np.zeros((points.shape[0], pyramids.shape[0]), dtype=np.bool_)
for i, pyramid in enumerate(pyramids):
flags[:, i] = np.logical_or(flags[:, i], box_utils.in_hull(points[:, 0:3], pyramid))
return flags
Expand Down
6 changes: 3 additions & 3 deletions pcdet/datasets/kitti/kitti_object_eval_python/kitti_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ def add_difficulty_to_annos(info):
occlusion = annos['occluded']
truncation = annos['truncated']
diff = []
easy_mask = np.ones((len(dims), ), dtype=np.bool)
moderate_mask = np.ones((len(dims), ), dtype=np.bool)
hard_mask = np.ones((len(dims), ), dtype=np.bool)
easy_mask = np.ones((len(dims), ), dtype=np.bool_)
moderate_mask = np.ones((len(dims), ), dtype=np.bool_)
hard_mask = np.ones((len(dims), ), dtype=np.bool_)
i = 0
for h, o, t in zip(height, occlusion, truncation):
if o > max_occlusion[0] or h <= min_height[0] or t > max_trunc[0]:
Expand Down
2 changes: 1 addition & 1 deletion pcdet/utils/box_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def in_hull(p, hull):
flag = hull.find_simplex(p) >= 0
except scipy.spatial.qhull.QhullError:
print('Warning: not a hull %s' % str(hull))
flag = np.zeros(p.shape[0], dtype=np.bool)
flag = np.zeros(p.shape[0], dtype=np.bool_)

return flag

Expand Down