nnmnkwii.paramgen.build_win_mats¶
-
nnmnkwii.paramgen.
build_win_mats
(windows, T)[source]¶ Builds a window matrix of a given size for each window in a collection.
- Parameters
- Returns
The returned value is a list of window matrices, one for each of the windows specified in
windows
. Each window matrix is aT
byT
Toeplitz matrix with lower bandwidthl
and upper bandwidthu
. The non-zero coefficients in each row of this Toeplitz matrix are given bywin_coeff
. The returned window matrices are stored as BandMats, i.e. using a banded representation.- Return type
Examples
>>> from nnmnkwii import paramgen as G >>> import numpy as np >>> windows = [ ... (0, 0, np.array([1.0])), # static ... (1, 1, np.array([-0.5, 0.0, 0.5])), # delta ... (1, 1, np.array([1.0, -2.0, 1.0])), # delta-delta ... ] >>> win_mats = G.build_win_mats(windows, 3)