Skip to content

Commit c777911

Browse files
authored
chore: remove type subscription for np.ndarray specification (#56)
* chore: remove type subscription for np.ndarray specification this is done to avoid errors on python<3.9 * chore: remove import of `Any` from typing since it's unused
1 parent ed8a0c3 commit c777911

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rvc/f0/f0.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Optional, Union
1+
from typing import Optional, Union
22

33
import torch
44
import numpy as np
@@ -23,12 +23,12 @@ def __init__(
2323

2424
def compute_f0(
2525
self,
26-
wav: np.ndarray[Any, np.dtype],
26+
wav: np.ndarray,
2727
p_len: Optional[int] = None,
2828
filter_radius: Optional[Union[int, float]] = None,
2929
): ...
3030

31-
def _interpolate_f0(self, f0: np.ndarray[Any, np.dtype]):
31+
def _interpolate_f0(self, f0: np.ndarray):
3232
"""
3333
对F0进行插值处理
3434
"""
@@ -66,7 +66,7 @@ def _interpolate_f0(self, f0: np.ndarray[Any, np.dtype]):
6666

6767
return ip_data[:, 0], vuv_vector[:, 0]
6868

69-
def _resize_f0(self, x: np.ndarray[Any, np.dtype], target_len: int):
69+
def _resize_f0(self, x: np.ndarray, target_len: int):
7070
source = np.array(x)
7171
source[source < 0.001] = np.nan
7272
target = np.interp(

0 commit comments

Comments
 (0)