mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-03-08 13:16:00 +08:00
lint things
Summary: Lint related fixes: Improve internal/OSS consistency. Fix the fight between black and certain pyre-ignore markers by moving them to the line before. Use clang-format-8 automatically if present. Small number of pyre fixes. arc doesn't run pyre at the moment, so I put back the explicit call to pyre. I don't know if there's an option somewhere to change this. Reviewed By: nikhilaravi Differential Revision: D19780518 fbshipit-source-id: ef1c243392322fa074130f6cff2dd8a6f7738a7f
This commit is contained in:
committed by
Facebook Github Bot
parent
9e21659fc5
commit
e491efb81f
@@ -2,6 +2,7 @@
|
||||
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
||||
|
||||
import functools
|
||||
from typing import Optional
|
||||
import torch
|
||||
|
||||
|
||||
@@ -246,7 +247,10 @@ def matrix_to_euler_angles(matrix, convention: str):
|
||||
|
||||
|
||||
def random_quaternions(
|
||||
n: int, dtype: torch.dtype = None, device=None, requires_grad=False
|
||||
n: int,
|
||||
dtype: Optional[torch.dtype] = None,
|
||||
device=None,
|
||||
requires_grad=False,
|
||||
):
|
||||
"""
|
||||
Generate random quaternions representing rotations,
|
||||
@@ -272,7 +276,10 @@ def random_quaternions(
|
||||
|
||||
|
||||
def random_rotations(
|
||||
n: int, dtype: torch.dtype = None, device=None, requires_grad=False
|
||||
n: int,
|
||||
dtype: Optional[torch.dtype] = None,
|
||||
device=None,
|
||||
requires_grad=False,
|
||||
):
|
||||
"""
|
||||
Generate random rotations as 3x3 rotation matrices.
|
||||
@@ -295,7 +302,7 @@ def random_rotations(
|
||||
|
||||
|
||||
def random_rotation(
|
||||
dtype: torch.dtype = None, device=None, requires_grad=False
|
||||
dtype: Optional[torch.dtype] = None, device=None, requires_grad=False
|
||||
):
|
||||
"""
|
||||
Generate a single random 3x3 rotation matrix.
|
||||
|
||||
Reference in New Issue
Block a user