Skip to content

Commit a95cfa8

Browse files
authored
[CODEMOD][pytorch] replace uses of np.ndarray with npt.NDArray (#3845)
Differential Revision: D64619891 Pull Request resolved: #3846
1 parent 79047bf commit a95cfa8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/torchaudio_unittest/prototype/functional/dsp_utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
import numpy.typing as npt
23

34

45
def oscillator_bank(
@@ -43,8 +44,8 @@ def freq_ir(magnitudes):
4344

4445

4546
def exp_sigmoid(
46-
input: np.ndarray, exponent: float = 10.0, max_value: float = 2.0, threshold: float = 1e-7
47-
) -> np.ndarray:
47+
input: npt.NDArray, exponent: float = 10.0, max_value: float = 2.0, threshold: float = 1e-7
48+
) -> npt.NDArray:
4849
"""Exponential Sigmoid pointwise nonlinearity (Numpy version).
4950
Implements the equation:
5051
``max_value`` * sigmoid(``input``) ** (log(``exponent``)) + ``threshold``

0 commit comments

Comments
 (0)