mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-01 03:12:49 +08:00
Convert .pyre_configuration.local to fast by default architecture] [batch:23/263] [shard:3/N] [A]
Reviewed By: connernilsen Differential Revision: D63415925 fbshipit-source-id: c3e28405c70f9edcf8c21457ac4faf7315b07322
This commit is contained in:
parent
75ebeeaea0
commit
fca83e6369
@ -163,6 +163,9 @@ def _read_chunks(
|
|||||||
if binary_data is not None:
|
if binary_data is not None:
|
||||||
binary_data = np.frombuffer(binary_data, dtype=np.uint8)
|
binary_data = np.frombuffer(binary_data, dtype=np.uint8)
|
||||||
|
|
||||||
|
# pyre-fixme[7]: Expected `Optional[Tuple[Dict[str, typing.Any],
|
||||||
|
# ndarray[typing.Any, typing.Any]]]` but got `Tuple[typing.Any,
|
||||||
|
# Optional[ndarray[typing.Any, dtype[typing.Any]]]]`.
|
||||||
return json_data, binary_data
|
return json_data, binary_data
|
||||||
|
|
||||||
|
|
||||||
|
@ -1250,6 +1250,9 @@ def _save_ply(
|
|||||||
if verts_normals is not None:
|
if verts_normals is not None:
|
||||||
verts_dtype.append(("normals", np.float32, 3))
|
verts_dtype.append(("normals", np.float32, 3))
|
||||||
if verts_colors is not None:
|
if verts_colors is not None:
|
||||||
|
# pyre-fixme[6]: For 1st argument expected `Tuple[str,
|
||||||
|
# Type[floating[_32Bit]], int]` but got `Tuple[str,
|
||||||
|
# Type[Union[floating[_32Bit], unsignedinteger[typing.Any]]], int]`.
|
||||||
verts_dtype.append(("colors", color_np_type, 3))
|
verts_dtype.append(("colors", color_np_type, 3))
|
||||||
|
|
||||||
vert_data = np.zeros(verts.shape[0], dtype=verts_dtype)
|
vert_data = np.zeros(verts.shape[0], dtype=verts_dtype)
|
||||||
|
@ -674,7 +674,6 @@ def _add_mesh_trace(
|
|||||||
verts[~verts_used] = verts_center
|
verts[~verts_used] = verts_center
|
||||||
|
|
||||||
row, col = subplot_idx // ncols + 1, subplot_idx % ncols + 1
|
row, col = subplot_idx // ncols + 1, subplot_idx % ncols + 1
|
||||||
# pyre-fixme[16]: `Figure` has no attribute `add_trace`.
|
|
||||||
fig.add_trace(
|
fig.add_trace(
|
||||||
go.Mesh3d(
|
go.Mesh3d(
|
||||||
x=verts[:, 0],
|
x=verts[:, 0],
|
||||||
@ -741,7 +740,6 @@ def _add_pointcloud_trace(
|
|||||||
|
|
||||||
row = subplot_idx // ncols + 1
|
row = subplot_idx // ncols + 1
|
||||||
col = subplot_idx % ncols + 1
|
col = subplot_idx % ncols + 1
|
||||||
# pyre-fixme[16]: `Figure` has no attribute `add_trace`.
|
|
||||||
fig.add_trace(
|
fig.add_trace(
|
||||||
go.Scatter3d(
|
go.Scatter3d(
|
||||||
x=verts[:, 0],
|
x=verts[:, 0],
|
||||||
@ -803,7 +801,6 @@ def _add_camera_trace(
|
|||||||
x, y, z = all_cam_wires.detach().cpu().numpy().T.astype(float)
|
x, y, z = all_cam_wires.detach().cpu().numpy().T.astype(float)
|
||||||
|
|
||||||
row, col = subplot_idx // ncols + 1, subplot_idx % ncols + 1
|
row, col = subplot_idx // ncols + 1, subplot_idx % ncols + 1
|
||||||
# pyre-fixme[16]: `Figure` has no attribute `add_trace`.
|
|
||||||
fig.add_trace(
|
fig.add_trace(
|
||||||
go.Scatter3d(x=x, y=y, z=z, marker={"size": 1}, name=trace_name),
|
go.Scatter3d(x=x, y=y, z=z, marker={"size": 1}, name=trace_name),
|
||||||
row=row,
|
row=row,
|
||||||
@ -898,7 +895,6 @@ def _add_ray_bundle_trace(
|
|||||||
ray_lines = torch.cat((ray_lines, nan_tensor, ray_line))
|
ray_lines = torch.cat((ray_lines, nan_tensor, ray_line))
|
||||||
x, y, z = ray_lines.detach().cpu().numpy().T.astype(float)
|
x, y, z = ray_lines.detach().cpu().numpy().T.astype(float)
|
||||||
row, col = subplot_idx // ncols + 1, subplot_idx % ncols + 1
|
row, col = subplot_idx // ncols + 1, subplot_idx % ncols + 1
|
||||||
# pyre-fixme[16]: `Figure` has no attribute `add_trace`.
|
|
||||||
fig.add_trace(
|
fig.add_trace(
|
||||||
go.Scatter3d(
|
go.Scatter3d(
|
||||||
x=x,
|
x=x,
|
||||||
@ -1010,7 +1006,6 @@ def _update_axes_bounds(
|
|||||||
|
|
||||||
# Ensure that within a subplot, the bounds capture all traces
|
# Ensure that within a subplot, the bounds capture all traces
|
||||||
old_xrange, old_yrange, old_zrange = (
|
old_xrange, old_yrange, old_zrange = (
|
||||||
# pyre-fixme[16]: `Scene` has no attribute `__getitem__`.
|
|
||||||
current_layout["xaxis"]["range"],
|
current_layout["xaxis"]["range"],
|
||||||
current_layout["yaxis"]["range"],
|
current_layout["yaxis"]["range"],
|
||||||
current_layout["zaxis"]["range"],
|
current_layout["zaxis"]["range"],
|
||||||
@ -1029,7 +1024,6 @@ def _update_axes_bounds(
|
|||||||
xaxis = {"range": x_range}
|
xaxis = {"range": x_range}
|
||||||
yaxis = {"range": y_range}
|
yaxis = {"range": y_range}
|
||||||
zaxis = {"range": z_range}
|
zaxis = {"range": z_range}
|
||||||
# pyre-fixme[16]: `Scene` has no attribute `update`.
|
|
||||||
current_layout.update({"xaxis": xaxis, "yaxis": yaxis, "zaxis": zaxis})
|
current_layout.update({"xaxis": xaxis, "yaxis": yaxis, "zaxis": zaxis})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user