
    bi                     >    d Z ddlmZ ddlZddlmZ  G d de      Zy)a,  
Copyright 2013 Steven Diamond

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.
    )TupleN)AffAtomc                   d     e Zd ZdZd
 fdZd Zdeedf   fdZde	fdZ
de	fdZde	fd	Z xZS )imagz2Extracts the imaginary part of an expression.
    returnc                 ,    t         t        |   |       y )N)superr   __init__)selfexpr	__class__s     R/home/cdr/jupyterlab/.venv/lib/python3.12/site-packages/cvxpy/atoms/affine/imag.pyr
   zimag.__init__   s    dD"4(    c                 2    t        j                  |d         S )z(Imaginary part of an expression
        r   )npr   )r   valuess     r   numericzimag.numeric   s     wwvay!!r   .c                 4    | j                   d   j                  S )z-Returns the shape of the expression.
        r   )argsshaper   s    r   shape_from_argszimag.shape_from_args"   s     yy|!!!r   c                      y)z%Is the expression imaginary?
        F r   s    r   is_imagzimag.is_imag'        r   c                      y)z*Is the expression complex valued?
        Fr   r   s    r   
is_complexzimag.is_complex,   r   r   c                 <    | j                   d   j                         S )z%Is the expression symmetric?
        r   )r   is_hermitianr   s    r   is_symmetriczimag.is_symmetric1   s     yy|((**r   )r   N)__name__
__module____qualname____doc__r
   r   r   intr   boolr   r   r!   __classcell__)r   s   @r   r   r      sJ    )"
"sCx "
 
D 
+d +r   r   )r%   typingr   numpyr   cvxpy.atoms.affine.affine_atomr   r   r   r   r   <module>r,      s!      2+7 +r   