Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

mypy fix

Dmytro Mishkin54378bfccbc0
diff --git a/kornia/filters/sobel.py b/kornia/filters/sobel.py
index 2a50b1d7c..e1de52667 100644
--- a/kornia/filters/sobel.py
+++ b/kornia/filters/sobel.py
@@ -53,8 +53,8 @@ class SpatialGradient(nn.Module):
# convolve input tensor with sobel kernel
kernel_flip: torch.Tensor = kernel.flip(-3)
# Pad with "replicate for spatial dims, but with zeros for channel dim
- padded_inp = F.pad(F.pad(input, (1, 1, 1, 1), 'replicate')[:, :, None],
- (0, 0, 0, 0, 1, 1), 'constant')
+ padded_inp = F.pad(F.pad(input, [1, 1, 1, 1], 'replicate')[:, :, None],
+ [0, 0, 0, 0, 1, 1], 'constant')
return F.conv3d(padded_inp, kernel_flip, padding=0, groups=c)