Commit 6318c81f authored by hwangjeff's avatar hwangjeff Committed by Facebook GitHub Bot
Browse files

Fix convolve mode docstring (#2809)

Summary:
Argument `mode` in `convolve` and `fftconvolve` is expected to be a string, but the docstrings incorrectly say bool. This PR fixes the docstrings accordingly.

Pull Request resolved: https://github.com/pytorch/audio/pull/2809

Reviewed By: nateanl

Differential Revision: D40854464

Pulled By: hwangjeff

fbshipit-source-id: 75b339ba34715723c93b91e7d48be2ed28bee115
parent 60f29ca0
...@@ -40,7 +40,7 @@ def fftconvolve(x: torch.Tensor, y: torch.Tensor, mode: str = "full") -> torch.T ...@@ -40,7 +40,7 @@ def fftconvolve(x: torch.Tensor, y: torch.Tensor, mode: str = "full") -> torch.T
x (torch.Tensor): First convolution operand, with shape `(..., N)`. x (torch.Tensor): First convolution operand, with shape `(..., N)`.
y (torch.Tensor): Second convolution operand, with shape `(..., M)` y (torch.Tensor): Second convolution operand, with shape `(..., M)`
(leading dimensions must match those of ``x``). (leading dimensions must match those of ``x``).
mode (bool, optional): Must be one of ("full", "valid", "same"). mode (str, optional): Must be one of ("full", "valid", "same").
* "full": Returns the full convolution result, with shape `(..., N + M - 1)`. (Default) * "full": Returns the full convolution result, with shape `(..., N + M - 1)`. (Default)
* "valid": Returns the segment of the full convolution result corresponding to where * "valid": Returns the segment of the full convolution result corresponding to where
...@@ -76,7 +76,7 @@ def convolve(x: torch.Tensor, y: torch.Tensor, mode: str = "full") -> torch.Tens ...@@ -76,7 +76,7 @@ def convolve(x: torch.Tensor, y: torch.Tensor, mode: str = "full") -> torch.Tens
x (torch.Tensor): First convolution operand, with shape `(..., N)`. x (torch.Tensor): First convolution operand, with shape `(..., N)`.
y (torch.Tensor): Second convolution operand, with shape `(..., M)` y (torch.Tensor): Second convolution operand, with shape `(..., M)`
(leading dimensions must match those of ``x``). (leading dimensions must match those of ``x``).
mode (bool, optional): Must be one of ("full", "valid", "same"). mode (str, optional): Must be one of ("full", "valid", "same").
* "full": Returns the full convolution result, with shape `(..., N + M - 1)`. (Default) * "full": Returns the full convolution result, with shape `(..., N + M - 1)`. (Default)
* "valid": Returns the segment of the full convolution result corresponding to where * "valid": Returns the segment of the full convolution result corresponding to where
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment