From c3a957671e2b09b20a27eb39eb981852f18262f5 Mon Sep 17 00:00:00 2001 From: Hiroshiba Kazuyuki Date: Thu, 13 Jun 2019 00:41:22 +0900 Subject: [PATCH] numpy.load --- become_yukarin/dataset/dataset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/become_yukarin/dataset/dataset.py b/become_yukarin/dataset/dataset.py index b584e44..433d0b4 100644 --- a/become_yukarin/dataset/dataset.py +++ b/become_yukarin/dataset/dataset.py @@ -8,13 +8,13 @@ from typing import Callable from typing import Dict from typing import List -import scipy.ndimage import chainer import librosa import numpy import pysptk import pyworld +import scipy.ndimage from ..config.config import DatasetConfig from ..config.sr_config import SRDatasetConfig @@ -180,7 +180,7 @@ def __init__(self, validate=False) -> None: self._validate = validate def __call__(self, path: Path, test=None): - d = numpy.load(path.expanduser()).item() # type: dict + d: Dict[str, Any] = numpy.load(path.expanduser(), allow_pickle=True).item() feature = AcousticFeature( f0=d['f0'], spectrogram=d['spectrogram'], @@ -198,7 +198,7 @@ def __init__(self, validate=False) -> None: self._validate = validate def __call__(self, path: Path, test=None): - d = numpy.load(path.expanduser()).item() # type: dict + d: Dict[str, Any] = numpy.load(path.expanduser(), allow_pickle=True).item() feature = LowHighSpectrogramFeature( low=d['low'], high=d['high'],