Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mglsadf #36

Merged
merged 12 commits into from
Apr 19, 2023
Merged
Prev Previous commit
Next Next commit
add docs
  • Loading branch information
takenori-y committed Apr 18, 2023
commit a3c8c053dc29a15287463ee03c2b5d0b3eef73f7
18 changes: 18 additions & 0 deletions diffsptk/misc/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def impulse(order, **kwargs):
order : int >= 0 [scalar]
Order of sequence, :math:`M`.

kwargs : additional keyword arguments
See `torch.eye <https://pytorch.org/docs/stable/generated/torch.eye.html>`_.

Returns
-------
x : Tensor [shape=(M+1,)]
Expand Down Expand Up @@ -60,6 +63,9 @@ def step(order, value=1, **kwargs):
value : float [scalar]
Step value.

kwargs : additional keyword arguments
See `torch.full <https://pytorch.org/docs/stable/generated/torch.full.html>`_.

Returns
-------
x : Tensor [shape=(M+1,)]
Expand Down Expand Up @@ -96,6 +102,9 @@ def ramp(arg, end=None, step=1, eps=1e-8, **kwargs):
eps : float [scalar]
A correction value.

kwargs : additional keyword arguments
See `torch.arange <https://pytorch.org/docs/stable/generated/torch.arange.html>`_.

Returns
-------
x : Tensor [shape=(?,)]
Expand Down Expand Up @@ -138,6 +147,9 @@ def sin(order, period=None, magnitude=1, **kwargs):
magnitude : float [scalar]
Magnitude.

kwargs : additional keyword arguments
See `torch.arange <https://pytorch.org/docs/stable/generated/torch.arange.html>`_.

Returns
-------
x : Tensor [shape=(M+1,)]
Expand Down Expand Up @@ -174,6 +186,9 @@ def train(order, frame_period, norm="power", **kwargs):
norm : ['none', 'power', 'magnitude']
Normalization type.

**kwargs : additional keyword arguments
See `torch.zeros <https://pytorch.org/docs/stable/generated/torch.zeros.html>`_.

Returns
-------
x : Tensor [shape=(M+1,)]
Expand Down Expand Up @@ -228,6 +243,9 @@ def nrand(*order, mean=0, stdv=1, var=None, **kwargs):
var : float >= 0 [scalar]
Variance.

**kwargs : additional keyword arguments
See `torch.randn <https://pytorch.org/docs/stable/generated/torch.randn.html>`_.

Returns
-------
x : Tensor [shape=(M+1,)]
Expand Down