mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-01 03:12:49 +08:00
remove print statements
Reviewed By: gkioxari Differential Revision: D19834684 fbshipit-source-id: 553dbf84d1062149b4915d313fc0f96eb047798c
This commit is contained in:
parent
09992a388f
commit
23bb27956a
@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
import numpy as np
|
||||
import warnings
|
||||
from typing import Any, Union
|
||||
import torch
|
||||
|
||||
@ -111,7 +112,7 @@ class TensorProperties(object):
|
||||
args_to_broadcast[k] = v
|
||||
else:
|
||||
msg = "Arg %s with type %r is not broadcastable"
|
||||
print(msg % (k, type(v)))
|
||||
warnings.warn(msg % (k, type(v)))
|
||||
|
||||
names = args_to_broadcast.keys()
|
||||
# convert from type dict.values to tuple
|
||||
|
@ -2,6 +2,7 @@
|
||||
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
||||
|
||||
import math
|
||||
import warnings
|
||||
import torch
|
||||
|
||||
|
||||
@ -663,7 +664,7 @@ def _check_valid_rotation_matrix(R, tol: float = 1e-7):
|
||||
Returns:
|
||||
None
|
||||
|
||||
Prints an warning if R is an invalid rotation matrix. Else return.
|
||||
Emits a warning if R is an invalid rotation matrix.
|
||||
"""
|
||||
N = R.shape[0]
|
||||
eye = torch.eye(3, dtype=R.dtype, device=R.device)
|
||||
@ -673,5 +674,5 @@ def _check_valid_rotation_matrix(R, tol: float = 1e-7):
|
||||
no_distortion = torch.allclose(det_R, torch.ones_like(det_R))
|
||||
if not (orthogonal and no_distortion):
|
||||
msg = "R is not a valid rotation matrix"
|
||||
print(msg)
|
||||
warnings.warn(msg)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user