Stricter typing, update docstrings (#226)

This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-07-28 11:36:43 -07:00
1 parent 395b03f48c
commit 44a7fa288c
10 files changed
+181 -181

No files matched your search

@@ -27,13 +27,15 @@ from nerfactory.utils.math import Gaussians
class SpatialDistortion(nn.Module):
"""Apply spatial distortions"""
def forward(self, positions: Union[TensorType[..., 3], Gaussians]) -> Union[TensorType[..., 3], Gaussians]:
def forward(
self, positions: Union[TensorType["bs":..., 3], Gaussians]
) -> Union[TensorType["bs":..., 3], Gaussians]:
"""
Args:
positions (Union[TensorType[..., 3], Gaussians]): Sample to distort
positions: Sample to distort
Returns:
Union[TensorType[..., 3], Gaussians]: distorted sample
Union: distorted sample
"""