nnmnkwii.util.remove_zeros_frames¶
-
nnmnkwii.util.
remove_zeros_frames
(x, eps=1e-07)[source]¶ Remove zeros frames.
Given a feature matrix, remove all zeros frames as well as trailing ones.
Parameters: - x (numpy.ndarray) – 2d feature matrix, shape (
T x D
) - eps (float) – Values smaller than
eps
considered as zeros.
Returns: Zeros-removed 2d feature matrix, shape (
T' x D
).Return type: Examples
>>> import numpy as np >>> from nnmnkwii.util import remove_zeros_frames >>> x = np.random.rand(100,10) >>> y = remove_zeros_frames(x)
- x (numpy.ndarray) – 2d feature matrix, shape (