
    bi 	                     L    d Z ddlZddlmZ ddlmZ ddlm	Z	 d	dZ
d
dZd
dZy)a*  
Copyright 2013 CVXPY Developers

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
    N)sum)norm)sum_squaresc                     |t        | ||      | j                  z  S |dv rt        | ||      | j                  |   z  S t        d      )z 
    Returns the mean of x.
    r      z:cp.mean doesn't yet support axis values other than 0 or 1.)	cvxpy_sumsizeshapeUserWarning)xaxiskeepdimss      L/home/cdr/jupyterlab/.venv/lib/python3.12/site-packages/cvxpy/atoms/stats.pymeanr      sP     |D(+aff44	D(+aggdm;;VWW    c                 @   |Kt        | t        |       z
  j                  d      d      t        j                  | j
                  |z
        z  S |dv rCt        | t        | |d      z
  d||      t        j                  | j                  |   |z
        z  S t        d      )zk
    Returns the standard deviation of x.

    `ddof` is the quantity to use in the Bessel correction.
    F)order   r   T)r   r   z9cp.std doesn't yet support axis values other than 0 or 1.)r   r   flattennpsqrtr
   r   
ValueErrorr   r   r   ddofs       r   stdr   $   s     |Qa[)))4a8277166D=;QQQ	AQd++QTHM''!''$-$./0 	0 TUUr   c                     |'t        | t        |       z
        | j                  |z
  z  S |dv rt        d      t	        d      )za
    Returns the variance of x.

    `ddof` is the quantity to use in the Bessel correction.
    r   zgaxis and keepdims are not yet supported for var.
            Use square(std(...)) instead.
            z9cp.var doesn't yet support axis values other than 0 or 1.)r   r   r
   NotImplementedErrorr   r   s       r   varr    2   sP     |1tAw;'166D=99	!
 	
 TUUr   )NF)NFr   )__doc__numpyr   cvxpy.atoms.affine.sumr   r	   cvxpy.atoms.normr   cvxpy.atoms.sum_squaresr   r   r   r     r   r   <module>r'      s*      3 ! /	XVVr   