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

changed deprecated 'np.bool' to 'bool' as required by new numpy. #28

Merged
merged 1 commit into from
May 9, 2023
Merged
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
6 changes: 3 additions & 3 deletions lamar/tasks/mapping.py
Original file line number Diff line number Diff line change
@@ -118,7 +118,7 @@ def get_points3D(self, key, point2D_indices):
if valid[-1]:
ids.append(p.point3D_id)
xyz.append(self.reconstruction.points3D[ids[-1]].xyz)
return np.array(valid, np.bool), xyz, ids
return np.array(valid, bool), xyz, ids


class MeshLifting(Mapping):
@@ -157,7 +157,7 @@ def lift_points2D(self, key, p2d):
directions = np.ascontiguousarray(directions, dtype=np.float32)
rays = (origins, directions)
xyz, valid = self.renderer.compute_intersections(rays)
return np.array(valid, np.bool), xyz
return np.array(valid, bool), xyz

def get_points3D(self, key, point2D_indices):
name = self.key2name[key]
@@ -225,4 +225,4 @@ def get_points3D(self, key, point2D_indices):
xyz.append(xyz_lift.pop(0))
ids.append(ids_lift.pop(0))
assert len(xyz_tri) == len(ids_tri) == len(xyz_lift) == len(ids_lift) == 0
return np.array(valid, np.bool), xyz, ids
return np.array(valid, bool), xyz, ids
2 changes: 1 addition & 1 deletion lamar/utils/retrieval.py
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ def filter_by_radio(session_q, session_r, keys_q, keys_r, conf: RadioFilterConf)
assert conf.frac_pairs_filter is not None
num_pairs_filter = int(np.ceil(conf.frac_pairs_filter * len(keys_r)))
radio_map = radio_mapping.build_radio_map(session_r, conf.window_us)
keep = np.full((len(keys_q), len(keys_r)), False, np.bool)
keep = np.full((len(keys_q), len(keys_r)), False, bool)
keyr2idx = {k: i for i, k in enumerate(keys_r)}
without_radios = []
def _worker_fn(i):
2 changes: 1 addition & 1 deletion scantools/viz/alignment.py
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ def plot_pnp_inliers(qname: str, refs: List[str], ret: Dict, data_root: Path, nu


def plot_raw_matches(qname: str, refs: List[str], match_data: Dict, data_root: Path, **args):
match_data = {**match_data, 'inliers': np.full(len(match_data['indices']), True, np.bool)}
match_data = {**match_data, 'inliers': np.full(len(match_data['indices']), True, bool)}
plot_pnp_inliers(qname, refs, match_data, data_root, **args)