formatting changes from black 22.3.0

Summary:
Applies the black-fbsource codemod with the new build of pyfmt.

paintitblack

Reviewed By: lisroach

Differential Revision: D36324783

fbshipit-source-id: 280c09e88257e5e569ab729691165d8dedd767bc
This commit is contained in:
John Reese
2022-05-11 19:55:56 -07:00
committed by Facebook GitHub Bot
parent c21ba144e7
commit bef959c755
25 changed files with 39 additions and 41 deletions

View File

@@ -217,7 +217,7 @@ def _align_camera_extrinsics(
# of centered A and centered B
Ac = A - Amu
Bc = B - Bmu
align_t_s = (Ac * Bc).mean() / (Ac ** 2).mean().clamp(eps)
align_t_s = (Ac * Bc).mean() / (Ac**2).mean().clamp(eps)
else:
# set the scale to identity
align_t_s = 1.0

View File

@@ -240,7 +240,7 @@ def _get_edge_indices(edges: int) -> List[int]:
edge_indices = []
for i in range(12):
if edges & (2 ** i):
if edges & (2**i):
edge_indices.append(i)
return edge_indices

View File

@@ -206,7 +206,7 @@ def _kernel_vec_distances(v):
# this should produce B x 6 x (D choose 2) tensor
# we should take dot-product of all (i,i)
rows_ii = (dv ** 2).sum(dim=-2)
rows_ii = (dv**2).sum(dim=-2)
# this should produce B x 6 x D tensor
return torch.cat((rows_ii, rows_2ij), dim=-1)

View File

@@ -151,7 +151,7 @@ def sample_farthest_points_naive(
# and all the other points. If a point has already been selected
# it's distance will be 0.0 so it will not be selected again as the max.
dist = points[n, selected_idx, :] - points[n, : lengths[n], :]
dist_to_last_selected = (dist ** 2).sum(-1) # (P - i)
dist_to_last_selected = (dist**2).sum(-1) # (P - i)
# If closer than currently saved distance to one of the selected
# points, then updated closest_dists