From c44e1ec9b24a70cc30de5682bf1855afe5eb0485 Mon Sep 17 00:00:00 2001 From: Hiroshiba Kazuyuki Date: Thu, 25 Jan 2018 20:10:01 +0900 Subject: mypy & harvest追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- become_yukarin/dataset/utility.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'become_yukarin/dataset/utility.py') diff --git a/become_yukarin/dataset/utility.py b/become_yukarin/dataset/utility.py index 9797818..ca68acf 100644 --- a/become_yukarin/dataset/utility.py +++ b/become_yukarin/dataset/utility.py @@ -9,7 +9,7 @@ class DTWAligner(object): from https://github.com/r9y9/nnmnkwii/blob/4cade86b5c35b4e35615a2a8162ddc638018af0e/nnmnkwii/preprocessing/alignment.py#L14 """ - def __init__(self, x, y, dist=lambda x, y: numpy.linalg.norm(x - y), radius=1): + def __init__(self, x, y, dist=lambda x, y: numpy.linalg.norm(x - y), radius=1) -> None: assert x.ndim == 2 and y.ndim == 2 _, path = fastdtw.fastdtw(x, y, radius=radius, dist=dist) @@ -40,10 +40,11 @@ class DTWAligner(object): class MFCCAligner(DTWAligner): - def __init__(self, x, y, *args, **kwargs): + def __init__(self, x, y, *args, **kwargs) -> None: x = self._calc_aligner_feature(x) y = self._calc_aligner_feature(y) - super().__init__(x, y, *args, dist=nnmnkwii.metrics.melcd, **kwargs) + kwargs.update(dist=nnmnkwii.metrics.melcd) + super().__init__(x, y, *args, **kwargs) @classmethod def _calc_delta(cls, x): -- cgit v1.2.3-70-g09d2