
    0;jiL                        d Z ddlmZmZmZmZmZmZ ddlZddl	Z	ddl
m
Z
 ddlZddlmZ ddlmZ g dZ ed          Z ed	          Zd
edededeeeef         geeef         f         fdZdededeeeef         geeef         f         fdZ ededef                   Zdddddddeeeee         f                  dee         deeeeef                           dedee         deegef         fdZdS )zHelpful tools for deprecation    )AnyCallableIterableOptionalTypeVarUnionN)	decorator)	DTypeLike)	ParamSpec)moved
deprecated	vectorizePR
moved_fromversionversion_removedreturnc                      dt           t          t          f         dt          j        dt          j        dt          f fd}t          |          S )zgMark functions as moved/renamed.

    Using the decorated (old) function will result in a warning.
    funcargskwargsr   c           	          t          j        d                    | j        | j                  t
          d            | |i |S ) Warn the user, and then proceed.zz{:s}
	This function was moved to '{:s}.{:s}' in librosa version {:s}.
	This alias will be removed in librosa version {:s}.   category
stacklevelwarningswarnformat
__module____name__FutureWarning)r   r   r   r   r   r   s      Q/root/voice-cloning/.venv/lib/python3.11/site-packages/librosa/util/decorators.py	__wrapperzmoved.<locals>.__wrapper   s`     FDOT]G_  #		
 		
 		
 		
 tT$V$$$    r   r   r   r   r   r	   )r   r   r   r'   s   ``` r&   r   r      se    %A %qv % %a % % % % % % % % Yr(   c                      dt           t          t          f         dt          j        dt          j        dt          f fd}t          |          S )zeMark a function as deprecated.

    Using the decorated (old) function will result in a warning.
    r   r   r   r   c                     t          j        d                    | j        | j                  t
          d            | |i |S )r   z^{:s}.{:s}
	Deprecated as of librosa version {:s}.
	It will be removed in librosa version {:s}.r   r   r   )r   r   r   r   r   s      r&   r'   zdeprecated.<locals>.__wrapper5   s\    >>Df? ? #	
 	
 	
 	
 tT$V$$$r(   r)   )r   r   r'   s   `` r&   r   r   -   s_    
%A 
%qv 
% 
%a 
% 
% 
% 
% 
% 
% 
% Yr(   _F.)boundFotypesdocexcludedcache	signaturer/   r0   r1   r2   r3   c                 "      fd}|S )zWrap a function for use with np.vectorize.

    This function is not quite a decorator, but is used as a wrapper
    to np.vectorize that preserves scalar behavior.
    c                 |    t          j        |           t          j        |           fd            }|S )Nr.   c                  t     | i |}t          j        | d                   r|                                S |S )Nr   )npisscalaritem)r   r   yvecfuncs      r&   _vecz*vectorize.<locals>.__wrapper.<locals>._vec_   s?    (((A{47## vvxxr(   )r7   r   	functoolswraps)functionr<   r;   r2   r0   r1   r/   r3   s     @r&   r'   zvectorize.<locals>.__wrapperU   sc    ,
 
 
 
	"	"	 	 	 	 
#	"	 r(    )r/   r0   r1   r2   r3   r'   s   ````` r&   r   r   G   s<            ( r(   )__doc__typingr   r   r   r   r   r   r    r=   r	   numpyr7   numpy.typingr
   typing_extensionsr   __all__r   r   strr   r   r,   intboolr   r@   r(   r&   <module>rJ      s   $ # D D D D D D D D D D D D D D D D                " " " " " " ' ' ' ' ' '
.
.
.IcNNGCLL  !$ 7: x1~A./       2  &) x1~A./       . WT#s(+,,,
 9=48#" " "U3 3345" 
#" xc3h01	"
 " }" rdBh" " " " " "r(   