+
    /i*                     :   ^ RI t ^ RIt^ RIt^ RIHt ^ RIHtHtH	t	 ^ RI
HtHt ^ RIHt ^ RIHt ^ RIHt ]P&                  ! RR.RR.RR	..4      t]P&                  ! . RO4      t ! R
 R4      t ! R R4      t ! R R]]4      t ! R R]4      t ! R R4      tR# )    N)lstsq)assert_allcloseassert_equalassert_)random_array	coo_array)aslinearoperator)
lsq_linear)BoundsgS?gS㥫?c                      a  ] tR t^t o R tR tR tR tR tR t	R t
R t]P                  P                  R	 4       tR
 tRtV tR# )	BaseMixinc                N    \         P                  P                  R 4      V n        R# )i N)nprandomdefault_rngrnd)selfs   &b/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/optimize/tests/test_lsq_linear.pysetup_methodBaseMixin.setup_method   s    99((1    c           
        V P                    F|  p\        \        \        V P                  VR 7      p\        VP                  \        \        \        RR7      ^ ,          4       \        VP                  VP                  ^ ,          4       K~  	  R# )method
lsq_solverrcondN)	lsq_solversr
   Abr   r   xr   unbounded_sol)r   r   ress   &  r   test_dense_no_boundsBaseMixin.test_dense_no_bounds   s[    **JQ$++*MCCEE5AR#8#;<CEE3#4#4Q#78 +r   c           
        \         P                  ! R
R.4      p\         P                  ! ^^ .4      p\        \        \        R
R7      ^ ,          pV P
                   Ft  p\        \        \        W3V P                  VR7      p\        VP                  \        \        \        R
R7      ^ ,          4       \        VP                  ^ ,          V4       Kv  	  \         P                  ! R\         P                  ) .4      pV P
                   F  p\        \        \        V\         P                  3V P                  VR7      p\        VP                  \         P                  ! RR.4      RR7       \        VP                  ^ ,          V4       K  	  \         P                  ! R
^ .4      pV P
                   F  p\        \        \        V\         P                  3V P                  VR7      p\        VP                  \         P                  ! R^ .4      RR7       \        VP                  ^ ,          V4       K  	  \         P                  ! \         P                  R.4      pV P
                   F  p\        \        \        \         P                  ) V3V P                  VR7      p\        VP                  \         P                  ! RR.4      4       \        VP                  ^ ,          V4       K  	  \         P                  ! R
\         P                  .4      pV P
                   F  p\        \        \        \         P                  ) V3V P                  VR7      p\        VP                  \         P                  ! R
R.4      4       \        VP                  ^ ,          V4       K  	  \         P                  ! ^ R.4      p\         P                  ! ^^ .4      pV P
                   Fo  p\        \        \        W3V P                  VR7      p\        VP                  \         P                  ! RR.4      4       \        VP                  ^ ,          V4       Kq  	  R	# )   r   r           ư>atolgԡw?gV瞯< 
su?Nr   ig1VggUw-r)r   arrayr   r    r!   r   r
   r   r   r"   r#   inf)r   lbubr#   r   r$   s   &     r   test_dense_boundsBaseMixin.test_dense_bounds!   s   XXr3i XXq!fa"-a0**JQB8DKK(24CCEE5AR#8#;<C--a0-@	 + XXsRVVGn%**JQB<(24CCEE288S2D,E#F!%'C--a0-@ + XXr1g**JQB<(24CCEE288->,B#C!&(C--a0-@ + XXrvvrl#**JQRVVGR=(24CCEE288-?,D#EFC--a0-@	 + XXr266l#**JQRVVGR=(24CCEE288R1C,D#EFC--a0-@	 + XXq"gXXq!f**JQB8DKK(24CCEE288->,C#DEC--a0-@	 +r   c                   \         P                  ! ^^.4      pV P                  P                  RR7      pW!,          p\         P                  ! ^^.4      p\         P                  ! ^^.4      pWE3p\	        WE4      p\        W#V4      p\        W#V4      p	\         P                  ! V	P                  V	P                  ^ ,          4      '       d   Q h\        VP                  V	P                  4       R# )r(   sizeN)   r9   )
r   r0   r   uniformr   r
   allcloser"   r#   r   )
r   r"   r    r!   r2   r3   
bounds_old
bounds_newres_oldres_news
   &         r   test_bounds_variantsBaseMixin.test_bounds_variantsR   s    HHaVHH&)CXXq!fXXq!fX
B^
Q:.Q:.;;wyy'*?*?*BCCCC		799-r   c                .   \         P                  ! 4       ;_uu_ 4        \         P                  ! R \        4       \        P
                  ! . RO. RO.4      pRRR4       \        P                  ! ^^.4      p\        XV4       R#   + '       g   i     L6; i)ignoreN)   r/   r   r9      )
   r(   r   r   )warningscatch_warningssimplefilterPendingDeprecationWarningr   matrixr0   r
   )r   r    ks   &  r   test_np_matrixBaseMixin.test_np_matrix_   sc    $$&&!!(,EF		,.@ABA ' HHb"X1a	 '&s   8BB	c           
        \         P                  ! RR..4      p\         P                  ! R.4      pRR.pRR.pV P                   Fd  p\        WW43V P                  VR7      p\        VP                  RR.4       \        VP                  ^ ,          \        WRR7      ^ ,          4       Kf  	  \         P                  ! RR.RR.RR..4      p\         P                  ! . RO4      p^ R.p^R.pV P                   Fd  p\        WW43V P                  VR7      p\        VP                  ^ R	R
7       \        VP                  ^ ,          \        WRR7      ^ ,          4       Kf  	  R# )gS?g#~j?g?r   r   gK7A`?gK7A`?g~jt?g~jt?gdy=r+   NgSӿgZd;Oǿ皙r   gPngPn)g`"gHzG?gJ+?g      )
r   r0   r   r
   r   r   r"   r#   r   
optimality)r   r    r!   r2   r3   r   r$   s   &      r   test_dense_rank_deficient#BaseMixin.test_dense_rank_deficientg   s>   HHvv&'(HHeWD\3Z**JQB8DKK(24CCEED$<0C--a0%B2G2JK	 + HHENVEN
 
 HH+,WY**JQB8DKK(24CCNNAE:C--a0%B2G2JK	 +r   c           	        \         P                  ! ^ R	.4      p\         P                  ! ^^ .4      p\        \        \        W3V P
                  R7      p\        VP                  RR	.4       \        VP                  ^ ,          \        \        \        R
R7      ^ ,          4       \        P                  VP                  4      \        ,
          p\        VP                  R\         P                  ! WD4      ,          4       \        VP                  V4       \        VP                  RRR7       \        VP                  ^ R
.4       \!        VP"                  ^8  4       \!        VP$                  ^8H  ;'       g    VP$                  ^8H  4       \!        \'        VP(                  \*        4      4       \!        VP,                  4       R# )r   r   r-   r   g      ?r)   g-q=r+   Nr/   r   )r   r0   r
   r    r!   r   r   r"   r#   r   dotcostfunrR   r   active_maskr   nitstatus
isinstancemessagestrsuccess)r   r2   r3   r$   rs   &    r   test_full_resultBaseMixin.test_full_result   s#   XXq"gXXq!fAx< 1267))!,eAq.CA.FGEE#%%L1#q"45#%8S__q"g."

a223::?3
3;;,-r   c                    \         P                  ! . RO. RO. RO.4      p\         P                  ! . RO4      p\        WV P                  R7      p\	        VP
                  R8  4       R# )SQcU?rV   gg5_PG>N)re   gn-(8?g(8?)gڌ?g,?gk,?)g\s`?gAʨY?g Y?)gt\O?v?g"He?gFH{?)r   r0   r
   r   r   rX   )r   r    r!   results   &   r   test_almost_singularBaseMixin.test_almost_singular   sW    HHIIIKL
 HHHJ A5f$%r   c           	     2   \         P                  P                  R 4      p\         P                  ! VP	                  ^R^R7      4      w  r#V^,          pRVP	                  R^cW2.R7      ,          pRVP	                  R^cV.R7      ,          pR\         P                  ! VP	                  R^c^V3R7      ^ R7      ,          pVR;;,          R,          uu&   VP                  W"4      pVRV3,          p\        WEVRR7      P                  p\        WEVRR7      P                  p	\         P                  ! WH,          V,
          ^,          4      p
\         P                  ! WI,          V,
          ^,          4      p\        \        W,
          4      VR	,          8  4       R
# )i   r7         ?)axisNNNbvlsboundsr   trf绽|=Ni)r(   rm   )r   r   r   sortintegerschoicer
   r"   sumr   abs)r   rngnmr    r!   rp   wx_bvlsx_trf	cost_bvlscost_trfs   &           r   test_large_rank_deficient#BaseMixin.test_large_rank_deficient   s:   ii##G,wws||At!|45	Q#,,sBaV,44#,,sBaS,11rwws||C1a&|AJJt JJqadGA?AA1u=??FFAJNQ./	6619q=1,-I()HUN:;r   c                   \         P                  ! . RO. RO. RO.4      p\         P                  ! . R	O4      p\         P                  ! . R
O. RO.4      p\        WVRR7      P                  p\        WVRR7      P                  p\         P                  ! W,          V,
          ^,          4      p\         P                  ! W,          V,
          ^,          4      p\        \        Wg,
          4      VR,          8  4       R# )     H@rn   ro   rq   rr   N)r   g     D@      @)g      3r   g       )g      *g      $@g     @Q@)g     Dg     Vg     G@)g      ?@g      Fg      :@)g      K@r   g      <@)r   r0   r
   r"   rv   r   rw   )r   r    r!   rp   r|   r}   r~   r   s   &       r   test_convergence_small_array&BaseMixin.test_convergence_small_array   s    HH)*)+ , HH)*..0 1 A?AA1u=??FFAJNQ./	6619q=1,-I()HUN:;r   )r   N)__name__
__module____qualname____firstlineno__r   r%   r4   r@   rN   rS   rb   rg   pytestmarkxslowr   r   __static_attributes____classdictcell____classdict__s   @r   r   r      sX     29/Ab.L2(
& [[< <*< <r   r   c                   n   a  ] tR t^t o R t]P                  P                  ^
4      R 4       tR t	Rt
V tR# )SparseMixinc                ,   R pRp\         P                  P                  ^ 4      p\        W3VR7      pVP	                  V4      p\        WE4      p\        VP                  ^ RR7       \        V4      p\        WE4      p\        VP                  ^ RR7       R# )  rj   random_stater*   r+   N)	r   r   RandomStater   randnr
   r   rR   r	   )r   rz   ry   rx   r    r!   r$   s   &      r   test_sparse_and_LinearOperator*SparseMixin.test_sparse_and_LinearOperator   sy    ii##A&!c2IIaL5Q5r   c                   R pRp\         P                  P                  ^ 4      p\        W3VR7      pVP	                  V4      pVP	                  V4      pV^,           p\        WEWg34      p\        VP                  RRR7       \        WEWg3RRR7      p\        VP                  RRR7       \        WEWg3R	R
7      p\        VP                  RRR7       R# )r   rj   r   r)   r*   r+   gvIh%<=i  )lsmr_tollsmr_maxiterauto)r   N)r   r   r   r   r   r
   r   rR   )	r   rz   ry   rx   r    r!   r2   r3   r$   s	   &        r   test_sparse_boundsSparseMixin.test_sparse_bounds   s    ii##A&!c2IIaLYYq\!Vx($7x%&*,$7x&9$7r   c                <   \         P                  ! . RO4      p\         P                  ! . RO4      p\         P                  ! . R	O4      p\        WV33R
R7      p\        VP	                  4       \
        RR7      p\        V\
        RR7      p\        P                  ! \        4      ;_uu_ 4        \        VP                  VP                  4       RRR4       \        V\
        R^
R7      p\        VP                  VP                  4       R#   + '       g   i     LE; i)rk   )shapeexact)r   lsmrNr   r   )rk   rk   rk   gzo ?rk   )r   r   r(   r9   r9   )r   r9   r(   r   r9   )rE   rE   )r   r0   r   r
   toarrayr!   r   raisesAssertionErrorr   r"   )r   datarowcolr    	exact_soldefault_lsmr_sol	conv_lsmrs   &       r   test_sparse_ill_conditioned'SparseMixin.test_sparse_ill_conditioned   s    xx34hh'hh't3Z(7 qyy{A'B	 &av>]]>**IKK)9););< + q!RH		Y[[1 +*s   -!DD	 N)r   r   r   r   r   r   r   	fail_slowr   r   r   r   r   s   @r   r   r      s7     6 [[28 8&2 2r   r   c                   "    ] tR t^tRtRR.tRtR# )TestTRFrq   r   r   r   Nr   r   r   r   r   r   r   r   r   r   r   r      s    FF#Kr   r   c                        ] tR tRtRtR.tRtR# )TestBVLSi  rn   r   r   Nr   r   r   r   r   r     s    F)Kr   r   c                   ,   a  ] tR tRt o R tR tRtV tR# )TestErrorCheckingi  c           	        \        \        \        R RR7      p\        \        \        R RR7      p\        \        \        R RR7      pRp\        P                  ! \
        VR7      ;_uu_ 4        \        \        \        R RR7      pRRR4       \        P                  ! \
        VR7      ;_uu_ 4        \        \        \        R RR7      pRRR4       \        P                  ! \
        VR7      ;_uu_ 4        \        \        \        R ^R7      pRRR4       R#   + '       g   i     L; i  + '       g   i     Li; i  + '       g   i     R# ; i)	r   g{Gz?)r   r   r   Nz3`lsmr_tol` must be None, 'auto', or positive float.matchfoorQ   r
   r    r!   r   r   
ValueErrorr   _err_messages   &  r   test_option_lsmr_tol&TestErrorChecking.test_option_lsmr_tol  s    q!>q!@q!> L]]:[991aFTBA :]]:[991aFUCA :]]:[991aFQ?A :9	 :999999s$   ,D0D)4D<D&	)D9	<E	c           	        \        \        \        R ^R7      p\        \        \        R RR7      pRp\        P                  ! \
        VR7      ;_uu_ 4        \        \        \        R ^ R7      pRRR4       \        P                  ! \
        VR7      ;_uu_ 4        \        \        \        R RR7      pRRR4       R#   + '       g   i     LV; i  + '       g   i     R# ; i)r   r   Nz0`lsmr_maxiter` must be None or positive integer.r   r   r   r   s   &  r   test_option_lsmr_maxiter*TestErrorChecking.test_option_lsmr_maxiter  s    q!Q?q!TB I]]:[991aFCA :]]:[991aFDA :9 :9999s   B;C;C	C	r   N)r   r   r   r   r   r   r   r   r   s   @r   r   r     s     @ 
E 
Er   r   gv/gJ+gX9vϿgsh|?ſ)gl?gMbX9?gPnؿ)rH   r   numpyr   numpy.linalgr   numpy.testingr   r   r   scipy.sparser   r   scipy.sparse.linalgr	   scipy.optimizer
   scipy.optimize._minimizer   r0   r    r!   r   r   r   r   r   r   r   r   <module>r      s        @ @ 0 0 % + HH
FOVUO 
 HH#$m< m<`32 32l$i $
y 
E Er   