TorchDSP / torchsig

TorchSig is an open-source signal processing machine learning toolkit based on the PyTorch data handling pipeline.
MIT License
174 stars 40 forks source link

Outdated Documentation for resample functional Function #245

Closed romanziske closed 2 months ago

romanziske commented 2 months ago

Describe the bug The documentation for the resample function is outdated and does not accurately reflect the current function signature and behavior.

To Reproduce The current function signature is:

def resample(
    tensor: np.ndarray,
    resamp_rate: float,
    num_iq_samples: int,
    keep_samples: bool,
) -> np.ndarray:

However, the docstring describes different parameters and includes parameters that are not in the actual function signature.

   """Resample a tensor by rational value

    Args:
        samples (:class:`numpy.ndarray`):
            samples to be resampled.

        up_rate (:class:`int`):
            rate at which to up-sample the tensor

        down_rate (:class:`int`):
            rate at which to down-sample the tensor

        num_iq_samples (:class:`int`):
            number of IQ samples to have after resampling

        keep_samples (:class:`bool`):
            boolean to specify if the resampled data should be returned as is

        anti_alias_lpf (:class:`bool`)):
            boolean to specify if an additional anti aliasing filter should be
            applied

    Returns:
        Tensor:
            Resampled tensor
    """
MattCarrickPL commented 2 months ago

Thanks for reporting this. I have fixed this internally and will be part of our next release.