o
    X۷i                     @  s   d dl mZ d dlZd dlmZmZ dd ZG dd dZG dd	 d	eZG d
d deZ	dddZ
G dd deZdddZdd Zdd ZG dd deZdS )    )annotationsN)_asarray_validatedfloat_factorialc                 C  s   t | pt| do| jdkS )z-Check whether x is if a scalar type, or 0-dimshape )cupyisscalarhasattrr   )xr   r   V/home/ubuntu/vllm_env/lib/python3.10/site-packages/cupyx/scipy/interpolate/_polyint.py	_isscalar   s   r   c                   @  sX   e Zd ZdZdddZdd Zdd Zd	d
 Zdd ZdddZ	dddZ
dddZdS )_Interpolator1Da  Common features in univariate interpolation.

    Deal with input data type and interpolation axis rolling. The
    actual interpolator can assume the y-data is of shape (n, r) where
    `n` is the number of x-points, and `r` the number of variables,
    and use self.dtype as the y-data type.

    Attributes
    ----------
    _y_axis : Axis along which the interpolation goes in the
        original array
    _y_extra_shape : Additional shape of the input arrays, excluding
        the interpolation axis
    dtype : Dtype of the y-data arrays. It can be set via _set_dtype,
        which forces it to be float or complex

    Methods
    -------
    __call__
    _prepare_x
    _finish_y
    _reshape_y
    _reshape_yi
    _set_yi
    _set_dtype
    _evaluate

    Nc                 C  s2   || _ d | _d | _|d ur| j|||d d S d S )Nxiaxis)_y_axis_y_extra_shapedtype_set_yi)selfr   yir   r   r   r   __init__*   s   z_Interpolator1D.__init__c                 C  s$   |  |\}}| |}| ||S )a  Evaluate the interpolant

        Parameters
        ----------
        x : cupy.ndarray
            The points to evaluate the interpolant

        Returns
        -------
        y : cupy.ndarray
            Interpolated values. Shape is determined by replacing
            the interpolation axis in the original array with the shape of x

        Notes
        -----
        Input values `x` must be convertible to `float` values like `int`
        or `float`.

        )
_prepare_x	_evaluate	_finish_y)r   r
   x_shapeyr   r   r   __call__1   s   
z_Interpolator1D.__call__c                 C  s   t  )zA
        Actually evaluate the value of the interpolator
        )NotImplementedErrorr   r
   r   r   r   r   I      z_Interpolator1D._evaluatec                 C  s*   t |}t|ddd}|j}| |fS )z,
        Reshape input array to 1-D
        FT)check_finite
as_inexact)r   asarrayr   r   ravel)r   r
   r   r   r   r   r   O   s   
z_Interpolator1D._prepare_xc                 C  sz   | || j }| jdkr;|dkr;t|}t| j}tt||| j tt| tt|| j ||  }||}|S )zR
        Reshape interpolated y back to an N-D array similar to initial y
        r   r   )reshaper   r   lenlistrange	transpose)r   r   r   nxnysr   r   r   r   X   s   


z_Interpolator1D._finish_yFc                 C  sp   t || jd}|r.|jdd | jkr.d| j| j d | jd| j  f }td| ||jd dfS )z7
        Reshape the updated yi to a 1-D array
        r      Nz%r + (N,) + %rzData must be of shape %s)r   moveaxisr   r   r   
ValueErrorr%   )r   r   checkok_shaper   r   r   _reshape_yie   s   z_Interpolator1D._reshape_yic                 C  s   |d u r| j }|d u rtd|j}|dkrd}|d ur(|| t|kr(td||j | _ |jd | j  |j| j d d   | _d | _| |j d S )Nzno interpolation axis specifiedr   r-   z@x and y arrays must be equal in length along interpolation axis.r-   )r   r0   r   r&   ndimr   r   
_set_dtype)r   r   r   r   r   r   r   r   r   p   s   &z_Interpolator1D._set_yic                 C  sJ   t |t jst | jt jrt j| _d S |r| jt jkr#t j| _d S d S N)r   
issubdtypecomplexfloatingr   
complex128float64)r   r   unionr   r   r   r6      s   z_Interpolator1D._set_dtype)NNN)F)NN)__name__
__module____qualname____doc__r   r   r   r   r   r3   r   r6   r   r   r   r   r      s    
	

r   c                   @  s    e Zd ZdddZdddZdS )	_Interpolator1DWithDerivativesNc                 C  s   |  |\}}| ||}||jd f| | j }| jdkr\|dkr\t|}t| j}dgtt|d || j d  ttd|d  tt|d | j || d  }|	|}|S )a.  Evaluate many derivatives of the polynomial at the point x.

        The function produce an array of all derivative values at
        the point x.

        Parameters
        ----------
        x : cupy.ndarray
            Point or points at which to evaluate the derivatives
        der : int or None, optional
            How many derivatives to extract; None for all potentially
            nonzero derivatives (that is a number equal to the number
            of points). This number includes the function value as 0th
            derivative

        Returns
        -------
        d : cupy.ndarray
            Array with derivatives; d[j] contains the jth derivative.
            Shape of d[j] is determined by replacing the interpolation
            axis in the original array with the shape of x

        r   r   r-   )
r   _evaluate_derivativesr%   r   r   r   r&   r'   r(   r)   )r   r
   derr   r   r*   r+   r,   r   r   r   derivatives   s   
 
z*_Interpolator1DWithDerivatives.derivativesr-   c                 C  s.   |  |\}}| ||d }| || |S )a  Evaluate one derivative of the polynomial at the point x

        Parameters
        ----------
        x : cupy.ndarray
            Point or points at which to evaluate the derivatives
        der : integer, optional
            Which derivative to extract. This number includes the
            function value as 0th derivative

        Returns
        -------
        d : cupy.ndarray
            Derivative interpolated at the x-points. Shape of d is
            determined by replacing the interpolation axis in the
            original array with the shape of x

        Notes
        -----
        This is computed by evaluating all derivatives up to the desired
        one (using self.derivatives()) and then discarding the rest.

        r-   )r   rB   r   )r   r
   rC   r   r   r   r   r   
derivative   s   z)_Interpolator1DWithDerivatives.derivativer7   r4   )r=   r>   r?   rD   rE   r   r   r   r   rA      s    
%rA   c                      sF   e Zd ZdZdddZdddZddd	Z fd
dZdd Z  Z	S )BarycentricInterpolatora  The interpolating polynomial for a set of points.

    Constructs a polynomial that passes through a given set of points.
    Allows evaluation of the polynomial, efficient changing of the y
    values to be interpolated, and updating by adding more x values.
    For reasons of numerical stability, this function does not compute
    the coefficients of the polynomial.
    The value `yi` need to be provided before the function is
    evaluated, but none of the preprocessing depends on them,
    so rapid updates are possible.

    Parameters
    ----------
    xi : cupy.ndarray
        1-D array of x-coordinates of the points the polynomial should
        pass through
    yi : cupy.ndarray, optional
        The y-coordinates of the points the polynomial should pass through.
        If None, the y values will be supplied later via the `set_y` method
    axis : int, optional
        Axis in the yi array corresponding to the x-coordinate values

    See Also
    --------
    scipy.interpolate.BarycentricInterpolator

    Nr   c                 C  s   t | ||| |tj| _| | t| j| _dt	| jt
| j  | _tj| j}tj| jtjd}t| j||< t| j| _t| jD ]}| j| j| | j|   }d||| < dt| | j|< qMd S )Ng      @r   g      ?)r   r   astyper   r;   r   set_yir&   nmaxmin_inv_capacityrandompermutationzerosint32arangewir(   prod)r   r   r   r   permuteinv_permuteidistr   r   r   r      s   
z BarycentricInterpolator.__init__c                 C  sD   |du r	d| _ dS | j|| j|d | || _ | j j\| _| _dS )a  Update the y values to be interpolated.

        The barycentric interpolation algorithm requires the calculation
        of weights, but these depend only on the xi. The yi can be changed
        at any time.

        Parameters
        ----------
        yi : cupy.ndarray
            The y-coordinates of the points the polynomial should pass
            through. If None, the y values will be supplied later.
        axis : int, optional
            Axis in the yi array corresponding to the x-coordinate values

        Nr   )r   r   r   r3   r   rJ   r)r   r   r   r   r   r   rI      s   zBarycentricInterpolator.set_yic              	   C  s   |dur| j du rtd| j|dd}t| j |f| _ n	| j dur'td| j}t| j|f| _t| j| _|  j	dC  _	| j	}t
| j| _	|| j	d|< t|| jD ]/}| j	d|  | j| j| | jd|   9  < t| j| jd| | j|   | j	|< qW|  j	dC  _	dS )a  Add more x values to the set to be interpolated.

        The barycentric interpolation algorithm allows easy updating
        by adding more points for the polynomial to pass through.

        Parameters
        ----------
        xi : cupy.ndarray
            The x-coordinates of the points that the polynomial should
            pass through
        yi : cupy.ndarray, optional
            The y-coordinates of the points the polynomial should pass
            through. Should have shape ``(xi.size, R)``; if R > 1 then
            the polynomial is vector-valued
            If `yi` is not given, the y values will be supplied later.
            `yi` should be given if and only if the interpolator has y
            values specified

        NzNo previous yi value to update!T)r1   zNo update to yi provided!r.   )r   r0   r3   r   vstackrJ   concatenater   r&   rS   rP   r(   rM   rT   )r   r   r   old_nold_wijr   r   r   add_xi  s(   

0zBarycentricInterpolator.add_xic                   s   t  |S )ac  Evaluate the interpolating polynomial at the points x.

        Parameters
        ----------
        x : cupy.ndarray
            Points to evaluate the interpolant at

        Returns
        -------
        y : cupy.ndarray
            Interpolated values. Shape is determined by replacing the
            interpolation axis in the original array with the shape of x

        Notes
        -----
        Currently the code computes an outer product between x and the
        weights, that is, it constructs an intermediate array of size
        N by len(x), where N is the degree of the polynomial.

        )superr   r   	__class__r   r   r   A  s   z BarycentricInterpolator.__call__c                 C  s   |j dkrtjd| jf| jd}|S |dtjf | j }|dk}d||< | j| }t|| j	tj
|dddtjf  }t|}t|dkrZt|d dkrX| j	|d d  }|S | j	|d  ||d d < |S )Nr   rG   .r-   r.   r   )sizer   rP   rY   r   newaxisr   rS   dotr   sumnonzeror&   )r   r
   pczrY   r   r   r   r   Y  s   

&
z!BarycentricInterpolator._evaluateNr   r7   )
r=   r>   r?   r@   r   rI   r_   r   r   __classcell__r   r   ra   r   rF      s    


+rF   c                 C  s   t | ||d|S )a  Convenience function for polynomial interpolation.

    Constructs a polynomial that passes through a given
    set of points, then evaluates the polynomial. For
    reasons of numerical stability, this function does
    not compute the coefficients of the polynomial.

    Parameters
    ----------
    xi : cupy.ndarray
        1-D array of coordinates of the points the polynomial
        should pass through
    yi : cupy.ndarray
        y-coordinates of the points the polynomial should pass
        through
    x : scalar or cupy.ndarray
        Points to evaluate the interpolator at
    axis : int, optional
        Axis in the yi array corresponding to the x-coordinate
        values

    Returns
    -------
    y : scalar or cupy.ndarray
        Interpolated values. Shape is determined by replacing
        the interpolation axis in the original array with the
        shape x

    See Also
    --------
    scipy.interpolate.barycentric_interpolate

    rc   )rF   )r   r   r
   r   r   r   r   barycentric_interpolatek  s   #rn   c                   @  s,   e Zd ZdZd
ddZdd Zddd	ZdS )KroghInterpolatora  Interpolating polynomial for a set of points.

    The polynomial passes through all the pairs (xi,yi). One may
    additionally specify a number of derivatives at each point xi;
    this is done by repeating the value xi and specifying the
    derivatives as successive yi values
    Allows evaluation of the polynomial and all its derivatives.
    For reasons of numerical stability, this function does not compute
    the coefficients of the polynomial, although they can be obtained
    by evaluating all the derivatives.

    Parameters
    ----------
    xi : cupy.ndarray, length N
        x-coordinate, must be sorted in increasing order
    yi : cupy.ndarray
        y-coordinate, when a xi occurs two or more times in a row,
        the corresponding yi's represent derivative values
    axis : int, optional
        Axis in the yi array corresponding to the x-coordinate values.

    r   c           	      C  s  t | ||| |tj| _| || _| jj\| _	| _
tj| j	d | j
f| jd}| jd |d< tj| j	| j
f| jd}td| j	D ]}d}||krh|||  || krh|d7 }||krh|||  || ksV|d8 }| j| t| |d< t|| D ]=}|| || krtd|dkr|| ||  || ||   ||d < q}||d  ||  || ||   ||d < q}|||  ||< qD|| _d S )Nr-   rG   r   z Elements if `xi` can't be equal.)rA   r   rH   r   r;   r   r3   r   r   rJ   rY   rP   r   r(   r   r0   rj   )	r   r   r   r   rj   Vkkr,   rW   r   r   r   r     s,   *.
zKroghInterpolator.__init__c                 C  s   d}t jt|| jf| jd}|| jdt jd d f 7 }td| jD ]}|| j	|d   }|| }||d d t jf | j|  7 }q"|S )Nr-   rG   r   )
r   rP   r&   rY   r   rj   re   r(   rJ   r   )r   r
   piri   rq   wr   r   r   r     s   "zKroghInterpolator._evaluateNc                 C  s   | j }| j}|d u r| j }t|t|f}t|t|f}d|d< tjt|| jf| jd}|| jdtjd d f 7 }td|D ].}|| j	|d   ||d < ||d  ||d   ||< |||d d tjf | j|  7 }qBtjt
||d t||f| jd}	|	d |d d d d d f  | jd |d tjd d f 7  < ||	d< td|D ]B}td|| d D ],}
|||
 d  ||
d   ||
  ||
< |	| ||
d d tjf |	||
    |	|< q|	|  t|9  < qd|	|d d d d f< |	d | S )Nr-   r   rG   )rJ   rY   r   rP   r&   r   rj   re   r(   r   rK   r   )r   r
   rC   rJ   rY   rr   rs   ri   rq   cnrW   r   r   r   rB     s.   $$@(.z'KroghInterpolator._evaluate_derivativesr   r7   )r=   r>   r?   r@   r   r   rB   r   r   r   r   ro     s
    

ro   c                 C  sP   t | ||d}|dkr||S t|r|j||dS |j|t|d d| S )aL  Convenience function for polynomial interpolation

    Parameters
    ----------
    xi : cupy.ndarray
        x-coordinate
    yi : cupy.ndarray
        y-coordinates, of shape ``(xi.size, R)``. Interpreted as
        vectors of length R, or scalars if R=1
    x : cupy.ndarray
        Point or points at which to evaluate the derivatives
    der : int or list, optional
        How many derivatives to extract; None for all potentially
        nonzero derivatives (that is a number equal to the number
        of points), or a list of derivatives to extract. This number
        includes the function value as 0th derivative
    axis : int, optional
        Axis in the yi array corresponding to the x-coordinate values

    Returns
    -------
    d : cupy.ndarray
        If the interpolator's values are R-D then the
        returned array will be the number of derivatives by N by R.
        If `x` is a scalar, the middle dimension will be dropped; if
        the `yi` are scalars then the last dimension will be dropped

    See Also
    --------
    scipy.interpolate.krogh_interpolate

    rc   r   )rC   r-   )ro   r   rE   rD   r   amax)r   r   r
   rC   r   Pr   r   r   krogh_interpolate  s   !rx   c                 C  s   | j }t|t|kr@t|ddd |ddd D ]\}}|dkr(||kr( nq| jdkr<| j |kr<t|| j|  } |  S t| d| d| )z7Helper to check that arr_from broadcasts up to shape_toNr.   r-   z0 argument must be able to broadcast up to shape z but had shape )	r   r&   ziprd   r   onesr   r$   r0   )arr_fromshape_toname
shape_fromtfr   r   r   _check_broadcast_up_to  s   &r   c                 C  s   t | to| dkS )z?Helper to check if fill_value == "extrapolate" without warningsextrapolate)
isinstancestr)
fill_valuer   r   r   _do_extrapolate%  s   
r   c                   @  s   e Zd ZdZddddejdfddZed	d
 Zej	dd
 Zdd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd ZdS )interp1da@  
    Interpolate a 1-D function.

    `x` and `y` are arrays of values used to approximate some function f:
    ``y = f(x)``. This class returns a function whose call method uses
    interpolation to find the value of new points.

    Parameters
    ----------
    x : (npoints, ) array_like
        A 1-D array of real values.
    y : (..., npoints, ...) array_like
        A N-D array of real values. The length of `y` along the interpolation
        axis must be equal to the length of `x`. Use the ``axis`` parameter
        to select correct axis. Unlike other interpolators, the default
        interpolation axis is the last axis of `y`.
    kind : str or int, optional
        Specifies the kind of interpolation as a string or as an integer
        specifying the order of the spline interpolator to use.
        The string has to be one of 'linear', 'nearest', 'nearest-up', 'zero',
        'slinear', 'quadratic', 'cubic', 'previous', or 'next'. 'zero',
        'slinear', 'quadratic' and 'cubic' refer to a spline interpolation of
        zeroth, first, second or third order; 'previous' and 'next' simply
        return the previous or next value of the point; 'nearest-up' and
        'nearest' differ when interpolating half-integers (e.g. 0.5, 1.5)
        in that 'nearest-up' rounds up and 'nearest' rounds down. Default
        is 'linear'.
    axis : int, optional
        Axis in the ``y`` array corresponding to the x-coordinate values.
        Unlike other interpolators, defaults to ``axis=-1``.
    copy : bool, optional
        If ``True``, the class makes internal copies of x and y. If ``False``,
        references to ``x`` and ``y`` are used if possible. The default is to
        copy.
    bounds_error : bool, optional
        If True, a ValueError is raised any time interpolation is attempted on
        a value outside of the range of x (where extrapolation is
        necessary). If False, out of bounds values are assigned `fill_value`.
        By default, an error is raised unless ``fill_value="extrapolate"``.
    fill_value : array-like or (array-like, array_like) or "extrapolate", optional
        - if a ndarray (or float), this value will be used to fill in for
          requested points outside of the data range. If not provided, then
          the default is NaN. The array-like must broadcast properly to the
          dimensions of the non-interpolation axes.
        - If a two-element tuple, then the first element is used as a
          fill value for ``x_new < x[0]`` and the second element is used for
          ``x_new > x[-1]``. Anything that is not a 2-element tuple (e.g.,
          list or ndarray, regardless of shape) is taken to be a single
          array-like argument meant to be used for both bounds as
          ``below, above = fill_value, fill_value``. Using a two-element tuple
          or ndarray requires ``bounds_error=False``.
        - If "extrapolate", then points outside the data range will be
          extrapolated.

    assume_sorted : bool, optional
        If False, values of `x` can be in any order and they are sorted first.
        If True, `x` has to be an array of monotonically increasing values.

    See Also
    --------
    scipy.interpolate.interp1d

    Notes
    -----
    Calling `interp1d` with NaNs present in input values results in
    undefined behaviour.

    Input values `x` and `y` must be convertible to `float` values like
    `int` or `float`.

    If the values in `x` are not unique, the resulting behavior is
    undefined and specific to the choice of `kind`, i.e., changing
    `kind` will change the behavior for duplicates.
    linearr.   TNFc	                 C  s  t j| |||d || _|| _|dv rddddd| }	d}nt|tr)|}	d}n
|dvr3td	| tj|| jd
}tj|| jd
}|sXtj	|dd}
||
 }tj
||
|d}|jdkratd|jdkrjtdt|jjtjsx|tj}||j | _|| _| | j| _|| _~~|| _|dv rrd}|dkrd| _| jd | _| jdd | jdd  | _| jj| _n'|dkrd| _| jd | _| jdd | jdd  | _| jj| _n|dkrd| _d| _t| jtj  | _!| jj"| _t#|r| $  tj%t
| jd|f}n|dkr:d| _d| _t| jtj | _!| jj"| _t#|r9| $  t
| jd|tj%f}nttjttf}| jj|v oQ| jj|v }|oZ| jjdk}|obt#| }|rl| jj&| _nu| jj'| _no|	d }d}| j| j}}|	dkrt(| j}|) r| j|  }|j*dkrtdt+t,| jt-| jt.| j}d}t(| j) rt/| j}d}ddl0m1} ||||	dd| _2|r| jj3| _n| jj4| _t.| j|k rtd| || _5dS )z- Initialize a 1-D linear interpolation class.rc   )zeroslinear	quadraticcubicr   r-         spline)r   nearest
nearest-uppreviousnextz8%s is unsupported: Use fitpack routines for other types.)copystable)kindz,the x array must have exactly one dimension.z-the y array must have at least one dimension.r   leftg       @Nr.   r   rightr   r   Fz`x` array is all-nanT)make_interp_spline)rq   r!   z,x and y arrays must have at least %d entries)6r   r   bounds_errorr   r   intr   r   arrayargsorttaker5   r0   
issubclassr   typeinexactrH   r;   r   r   r3   _yr
   _kind_sidex_bdsrb   _call_nearest_call_ind	nextafterinf_x_shift_call_previousnextr   0_check_and_update_bounds_error_for_extrapolationnan_call_linear_np_call_linearisnananyrd   linspacenanminnanmaxr&   	ones_likecupyx.scipy.interpolater   _spline_call_nan_spline_call_spliner   )r   r
   r   r   r   r   r   r   assume_sortedorderindminval	np_dtypescondrewrite_nanxxyymasksxr   r   r   r   r   w  s   














zinterp1d.__init__c                 C  s   | j S )zThe fill value.)_fill_value_origr   r   r   r   r     r    zinterp1d.fill_valuec                 C  s   t |r|   d| _nj| jjd | j | jj| jd d   }t|dkr(d}t|trWt|dkrWt	
|d t	
|d g}d}tdD ]}t|| ||| ||< qGnt	
|}t||dgd }|\| _| _d| _| jd u rvd| _|| _d S )	NTr-   r   r4   r   )zfill_value (below)zfill_value (above)r   F)r   r   _extrapolater   r   r   r&   r   tupler   r#   r(   r   _fill_value_below_fill_value_abover   r   )r   r   broadcast_shapebelow_abovenamesiir   r   r   r     s:   



c                 C  s   | j rtdd| _ d S )Nz.Cannot extrapolate and raise at the same time.F)r   r0   r   r   r   r   r   1  s   
z9interp1d._check_and_update_bounds_error_for_extrapolationc                 C  s   t || j| jS r7   )r   interpr
   r   r   x_newr   r   r   r   7  s   zinterp1d._call_linear_npc                 C  s   t | j|}|dt| jd t}|d }|}| j| }| j| }| j| }| j| }|| || d d d f  }	|	|| d d d f  | }
|
S )Nr-   )r   searchsortedr
   clipr&   rH   r   r   )r   r   x_new_indiceslohix_lox_hiy_loy_hislopey_newr   r   r   r   ;  s   



zinterp1d._call_linearc                 C  s@   t j| j|| jd}|dt| jd t j}| j	| }|S )z5 Find nearest neighbor interpolated y_new = f(x_new).sider   r-   )
r   r   r   r   r   r&   r
   rH   intpr   )r   r   r   r   r   r   r   r   X  s   
zinterp1d._call_nearestc                 C  sV   t j| j|| jd}t| j| j }|d| j |t j	}| j
|| j d  }|S )z6Use previous/next neighbor of x_new, y_new = f(x_new).r   r-   )r   r   r   r   r&   r
   r   r   rH   r   r   )r   r   r   xnr   r   r   r   r   i  s   
zinterp1d._call_previousnextc                 C  s
   |  |S r7   )r   r   r   r   r   r   z  s   
zinterp1d._call_splinec                 C  s   |  |}tj|d< |S )N.)r   r   r   )r   r   outr   r   r   r   }  s   

zinterp1d._call_nan_splinec                 C  sN   t |}| | |}| js%| |\}}t|dkr%| j||< | j||< |S rl   )r   r#   r   r   _check_boundsr&   r   r   )r   r   r   below_boundsabove_boundsr   r   r   r     s   


zinterp1d._evaluatec                 C  s   || j d k }|| j d k}| jr*| r*|t| }td| d| j d  d| jrF| rF|t| }td| d| j d  d||fS )a  Check the inputs for being in the bounds of the interpolated data.

        Parameters
        ----------
        x_new : array

        Returns
        -------
        out_of_bounds : bool array
            The mask on x_new of values that are out of the bounds.
        r   r.   z	A value (z=) in x_new is below the interpolation range's minimum value (z).z=) in x_new is above the interpolation range's maximum value ()r
   r   r   r   argmaxr0   )r   r   r   r   below_bounds_valueabove_bounds_valuer   r   r   r     s   



zinterp1d._check_bounds)r=   r>   r?   r@   r   r   r   propertyr   setterr   r   r   r   r   r   r   r   r   r   r   r   r   r   +  s(    K
 

r   ru   )r   r   )
__future__r   r   cupyx.scipy._lib._utilr   r   r   r   rA   rF   rn   ro   rx   r   r   r   r   r   r   r   <module>   s    D 
&
Z*