
    >qj                     H    d dl Z G d d      Z G d d      Zd Zd Zd	dZy)
    Nc                   "    e Zd Zd Zed        Zy)_FakeMatrixc                 4    || _         |j                  | _        y N)_data__array_interface__selfdatas     V/opt/rentech/trading_bot/.venv/lib/python3.12/site-packages/scipy/linalg/_testutils.py__init__z_FakeMatrix.__init__   s    
#'#;#;     c                 .    | j                   j                  S r   r   shaper
   s    r   r   z_FakeMatrix.shape	       zzr   N)__name__
__module____qualname__r   propertyr    r   r   r   r      s    <    r   r   c                   *    e Zd Zd ZddZed        Zy)_FakeMatrix2c                     || _         y r   )r   r	   s     r   r   z_FakeMatrix2.__init__   s	    
r   Nc                 R    |r| j                   j                         S | j                   S r   )r   copy)r
   dtyper   s      r   	__array__z_FakeMatrix2.__array__   s     ::??$$zzr   c                 .    | j                   j                  S r   r   r   s    r   r   z_FakeMatrix2.shape   r   r   )NN)r   r   r   r   r   r   r   r   r   r   r   r      s     
    r   r   c                    t        |       dk(  r/| d   dk(  r't        j                  | |      }d|dddf<   d|d<   |S t        |       dk(  rc| d   | d   k(  rXt        j                  | |      }t        j                  | d         }d|||f<   d||dd |dd dz   f<   d||dd dz   |dd f<   |S t        j                  j                  d       t        j                  j                  |  j                  |      S )zz
    Get a test array of given shape and data type.
    Returned NxN matrices are posdef, and 2xN are banded-posdef.

       r   )r      Ni  )lennpzerosarangerandomseedrandnastype)r   r   xjs       r   
_get_arrayr/      s     5zQ58q=HHU%(!QR%!	UqU1Xq1HHU%(IIeAh!Q$ !CR&!CR&(
 !CR&(AcrF

		tyy&--e44r   c                     | S r   r   )r-   s    r   _idr1   5   s    Hr   c                    |>t         j                  t         j                  t         j                  t         j                  g}|D ]  }dD ]  }t
        t        t        fD ]  }|D cg c]  }t        ||       }}|D cg c]  } ||j                  |             }	} | |	  d|d|d}
t        |	|      D ]'  \  }}t         j                  j                  |||
       )    yc c}w c c}w )zA
    Test that a call does not overwrite its input arguments
    N)CFzcall modified inputs [z, ])err_msg)r&   float32float64	complex64
complex128r1   r   r   r/   r   ziptestingassert_equal)callshapesdtypesr   orderfakersorig_inputsr-   inputsmsgabs                r   assert_no_overwriterI   9   s    
 ~**bjj",,F ? 	?E{L9 ?=CDz!U3DD8CD1%u.DDf.uir%!D4 ?DAqJJ++Aq#+>??	?? EDs   #C'
<C,
r   )numpyr&   r   r   r/   r1   rI   r   r   r   <module>rK      s+          52?r   