Skip to content

Commit 18ce0a2

Browse files
authored
refactor: NumPy のレガシー関数を置き換え・ ruff NPY を導入 (#1644)
1 parent 5e84327 commit 18ce0a2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dev = [
4949
target-version = "py311"
5050

5151
[tool.ruff.lint]
52-
select = ["E", "F", "B", "I", "W", "UP", "D", "D213", "PT"]
52+
select = ["E", "F", "B", "I", "W", "UP", "D", "D213", "PT", "NPY"]
5353
ignore = [
5454
"E501", # line-too-long
5555
"D400", # missing-trailing-period。日本語の「。」に対応していないため。

test/unit/tts_pipeline/test_wave_synthesizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def test_raw_wave_to_output_wave_with_resample() -> None:
290290
"""Test `raw_wave_to_output_wave` with resampling option."""
291291
# Inputs
292292
query = _gen_query(volumeScale=2, outputSamplingRate=48000, outputStereo=True)
293-
raw_wave = np.random.rand(240).astype(np.float32)
293+
raw_wave = np.random.default_rng().random(240).astype(np.float32)
294294
sr_raw_wave = 24000
295295

296296
# Expects
@@ -306,7 +306,7 @@ def test_raw_wave_to_output_wave_without_resample() -> None:
306306
"""Test `raw_wave_to_output_wave` without resampling option."""
307307
# Inputs
308308
query = _gen_query(volumeScale=2, outputStereo=True)
309-
raw_wave = np.random.rand(240).astype(np.float32)
309+
raw_wave = np.random.default_rng().random(240).astype(np.float32)
310310
sr_raw_wave = 24000
311311

312312
# Expects

0 commit comments

Comments
 (0)