We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40d5649 commit de9b9b6Copy full SHA for de9b9b6
1 file changed
src/onnx_asr/utils.py
@@ -62,7 +62,7 @@ def read_wav_files(waveforms: list[npt.NDArray[np.float32] | str]) -> list[npt.N
62
63
def pad_list(arrays: list[npt.NDArray[np.float32]], axis: int = 0) -> tuple[npt.NDArray[np.float32], npt.NDArray[np.int64]]:
64
"""Pad list of Numpy arrays to common length."""
65
- lens = np.array([array.shape[axis] for array in arrays])
+ lens = np.array([array.shape[axis] for array in arrays], dtype=np.int64)
66
max_len = lens.max()
67
68
def pads(array: npt.NDArray[np.float32]) -> list[tuple[int, int]]:
0 commit comments