+
    /iN"                     .   R t ^ RIt^ RIHt . ROtR tR tR tR t	R t
R tR	 tR
 tR tR tR t ! R R]4      t]! 4       tR t ! R R]4      t]! 4       tR tR tR tR tR tR tR tR t ! R R]4      t]! 4       t ! R R]4      t ] ! 4       t!R# ) zHCollection of Model instances for use with the odrpack fitting package.
N)Modelc                     V ^ ,          V R,          r2VP                  VP                  ^ ,          ^34      pW!V,          P                  ^ R7      ,           #        NNaxis)reshapeshapesum)Bxabs   &&  O/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/odr/_models.py_lin_fcnr   
   sC    Q42q			1771:q/"A!yyay       c                    \         P                  ! VP                  R,          \        4      p\         P                  ! W!P                  4       34      pVP                  V P                  R,          VP                  R,          34      # r   )nponesr   floatconcatenateravelr
   )r   r   r   ress   &&  r   _lin_fjbr      sT    
U#A
..!WWY
(C;;QWWR[122r   c                     V R ,          p\         P                  ! W!P                  R,          3VP                  R,          ,          ^ R7      pVP                  VP                  4      # )r   r   r   )r   repeatr   r
   )r   r   r   s   && r   _lin_fjdr       sE    	"A
		!ggbk^AGGBK/a8A99QWWr   c                     \        V P                  P                  4      ^8X  d   V P                  P                  ^ ,          pM^p\        P                  ! V^,           3\
        4      #    )lenr   r   r   r   r   )datams   & r   _lin_estr'      sF    
 466<<AFFLLO77AE8U##r   c                     V ^ ,          V R,          rCVP                  VP                  ^ ,          ^34      pV\        P                  ! V\        P                  ! W4      ,          ^ R7      ,           # r   r
   r   r   r   power)r   r   powersr   r   s   &&&  r   	_poly_fcnr,   *   sO    Q42q			1771:q/"Arvva"((1--A666r   c                 ,   \         P                  ! \         P                  ! VP                  R,          \        4      \         P
                  ! W4      P                  34      pVP                  V P                  R,          VP                  R,          34      # r   )r   r   r   r   r   r*   flatr
   )r   r   r+   r   s   &&& r   _poly_fjacbr/   1   s`    
.."''!''"+u5((1-224 5C;;QWWR[122r   c                     V R ,          pVP                  VP                  ^ ,          ^34      pW2,          p\        P                  ! V\        P                  ! W^,
          4      ,          ^ R7      # )r   r   r)   )r   r   r+   r   s   &&& r   _poly_fjacdr1   7   sO    	"A			1771:q/"A	
A66!bhhq(++!44r   c                 f    V ^ ,          \         P                  ! V ^,          V,          4      ,           # r   r   expr   r   s   &&r   _exp_fcnr7   @   "    Q4"&&1"""r   c                 f    V ^,          \         P                  ! V ^,          V,          4      ,          # )r   r4   r6   s   &&r   _exp_fjdr:   D   r8   r   c                     \         P                  ! \         P                  ! VP                  R,          \        4      V\         P
                  ! V ^,          V,          4      ,          34      pVP                  ^VP                  R,          34      # r   )r   r   r   r   r   r5   r
   )r   r   r   s   && r   _exp_fjbr<   H   sZ    
.."''!''"+u5q266!A$(;K7KL
MC;;1772;'((r   c                 2    \         P                  ! R R .4      # )      ?)r   arrayr%   s   &r   _exp_estrA   M   s    88RHr   c                   6   a a ] tR t^Rt oRtV 3R ltRtVtV ;t# )_MultilinearModela~  
Arbitrary-dimensional linear model

.. deprecated:: 1.17.0
    `scipy.odr` is deprecated and will be removed in SciPy 1.19.0. Please use
    `pypi.org/project/odrpack/ <https://pypi.org/project/odrpack/>`_
    instead.


This model is defined by :math:`y=\beta_0 + \sum_{i=1}^m \beta_i x_i`

Examples
--------
We can calculate orthogonal distance regression with an arbitrary
dimensional linear model:

>>> from scipy import odr
>>> import numpy as np
>>> x = np.linspace(0.0, 5.0)
>>> y = 10.0 + 5.0 * x
>>> data = odr.Data(x, y)
>>> odr_obj = odr.ODR(data, odr.multilinear)
>>> output = odr_obj.run()
>>> print(output.beta)
[10.  5.]

c                \   < \         SV `  \        \        \        \
        R RRRRR/R7       R# )namezArbitrary-dimensional Linearequz y = B_0 + Sum[i=1..m, B_i * x_i]TeXequz&$y=\beta_0 + \sum_{i=1}^m \beta_i x_i$)fjacbfjacdestimatemetaN)super__init__r   r   r    r'   self	__class__s   &r   rM   _MultilinearModel.__init__o   s7    HHx8;EG 	 	Hr    	__name__
__module____qualname____firstlineno____doc__rM   __static_attributes____classdictcell____classcell__rP   __classdict__s   @@r   rC   rC   R   s     8H Hr   rC   c                r   \         P                  ! V 4      pVP                  R	8X  d   \         P                  ! ^V^,           4      pVP	                  \        V4      ^34      p\        V4      ^,           pV3R lp\        \        \        \        W13RRRRV^,
          ,          RRV^,
          ,          /R7      # )
a  
Factory function for a general polynomial model.

.. deprecated:: 1.17.0
    `scipy.odr` is deprecated and will be removed in SciPy 1.19.0. Please use
    `pypi.org/project/odrpack/ <https://pypi.org/project/odrpack/>`_
    instead.

Parameters
----------
order : int or sequence
    If an integer, it becomes the order of the polynomial to fit. If
    a sequence of numbers, then these are the explicit powers in the
    polynomial.
    A constant term (power 0) is always included, so don't include 0.
    Thus, polynomial(n) is equivalent to polynomial(range(1, n+1)).

Returns
-------
polynomial : Model instance
    Model instance.

Examples
--------
We can fit an input data using orthogonal distance regression (ODR) with
a polynomial model:

>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> from scipy import odr
>>> x = np.linspace(0.0, 5.0)
>>> y = np.sin(x)
>>> poly_model = odr.polynomial(3)  # using third order polynomial model
>>> data = odr.Data(x, y)
>>> odr_obj = odr.ODR(data, poly_model)
>>> output = odr_obj.run()  # running ODR fitting
>>> poly = np.poly1d(output.beta[::-1])
>>> poly_y = poly(x)
>>> plt.plot(x, y, label="input data")
>>> plt.plot(x, poly_y, label="polynomial ODR")
>>> plt.legend()
>>> plt.show()

c                 :    \         P                  ! V3\        4      # )N)r   r   r   )r%   len_betas   &&r   	_poly_estpolynomial.<locals>._poly_est   s    ww{E**r   rE   zSorta-general PolynomialrF   z$y = B_0 + Sum[i=1..%s, B_i * (x**i)]rG   z)$y=\beta_0 + \sum_{i=1}^{%s} \beta_i x^i$)rI   rH   rJ   
extra_argsrK   rR   )
r   asarrayr   aranger
   r$   r   r,   r1   r/   )orderr+   r`   ra   s   &   r   
polynomialrg   z   s    \ ZZF||r1fqj)^^S[!,-F6{QH!) + +[#	9>(1*MG!!%&' 'r   c                   6   a a ] tR t^t oRtV 3R ltRtVtV ;t# )_ExponentialModela[  
Exponential model

.. deprecated:: 1.17.0
    `scipy.odr` is deprecated and will be removed in SciPy 1.19.0. Please use
    `pypi.org/project/odrpack/ <https://pypi.org/project/odrpack/>`_
    instead.

This model is defined by :math:`y=\beta_0 + e^{\beta_1 x}`

Examples
--------
We can calculate orthogonal distance regression with an exponential model:

>>> from scipy import odr
>>> import numpy as np
>>> x = np.linspace(0.0, 5.0)
>>> y = -10.0 + np.exp(0.5*x)
>>> data = odr.Data(x, y)
>>> odr_obj = odr.ODR(data, odr.exponential)
>>> output = odr_obj.run()
>>> print(output.beta)
[-10.    0.5]

c                \   < \         SV `  \        \        \        \
        R RRRRR/R7       R# )rE   ExponentialrF   zy= B_0 + exp(B_1 * x)rG   z$y=\beta_0 + e^{\beta_1 x}$rI   rH   rJ   rK   N)rL   rM   r7   r:   r<   rA   rN   s   &r   rM   _ExponentialModel.__init__   s6    "*%}$&=')GI 	 	Jr   rR   rS   r\   s   @@r   ri   ri           4J Jr   ri   c                 <    W^ ,          ,          V ^,          ,           # r3   rR   r6   s   &&r   _unilinrp      s    qT6AaD=r   c                 h    \         P                  ! VP                  \        4      V ^ ,          ,          # r3   )r   r   r   r   r6   s   &&r   _unilin_fjdrr      s     77177E"QqT))r   c                     \         P                  ! V\         P                  ! VP                  \        4      34      pVP                  RVP                  ,           4      # )r#   r"   r   r   r   r   r   r
   r   r   _rets   && r   _unilin_fjbrw      s;    >>1bggaggu567D<<qww''r   c                     R# )r>   )r>   r>   rR   r@   s   &r   _unilin_estry      s    Or   c                 f    WV ^ ,          ,          V ^,          ,           ,          V ^,          ,           # r3   rR   r6   s   &&r   
_quadraticr{      s$    !fqtmqt##r   c                 L    ^V,          V ^ ,          ,          V ^,          ,           # r"   rR   r6   s   &&r   	_quad_fjdr}      s    Q3qt8ad?r   c                     \         P                  ! W,          V\         P                  ! VP                  \        4      34      pVP                  RVP                  ,           4      # )   )r   rt   ru   s   && r   	_quad_fjbr      s?    >>13277177E#:;<D<<qww''r   c                     R# )r>   )r>   r>   r>   rR   r@   s   &r   	_quad_estr      s    r   c                   6   a a ] tR tRt oRtV 3R ltRtVtV ;t# )_UnilinearModeli  aM  
Univariate linear model

.. deprecated:: 1.17.0
    `scipy.odr` is deprecated and will be removed in SciPy 1.19.0. Please use
    `pypi.org/project/odrpack/ <https://pypi.org/project/odrpack/>`_
    instead.

This model is defined by :math:`y = \beta_0 x + \beta_1`

Examples
--------
We can calculate orthogonal distance regression with an unilinear model:

>>> from scipy import odr
>>> import numpy as np
>>> x = np.linspace(0.0, 5.0)
>>> y = 1.0 * x + 2.0
>>> data = odr.Data(x, y)
>>> odr_obj = odr.ODR(data, odr.unilinear)
>>> output = odr_obj.run()
>>> print(output.beta)
[1. 2.]

c                \   < \         SV `  \        \        \        \
        R RRRRR/R7       R# )rE   zUnivariate LinearrF   zy = B_0 * x + B_1rG   z$y = \beta_0 x + \beta_1$rl   N)rL   rM   rp   rr   rw   ry   rN   s   &r   rM   _UnilinearModel.__init__  s7    ;"-%':$&9')FH 	 	Ir   rR   rS   r\   s   @@r   r   r     s     4I Ir   r   c                   6   a a ] tR tRt oRtV 3R ltRtVtV ;t# )_QuadraticModeli*  ad  
Quadratic model

.. deprecated:: 1.17.0
    `scipy.odr` is deprecated and will be removed in SciPy 1.19.0. Please use
    `pypi.org/project/odrpack/ <https://pypi.org/project/odrpack/>`_
    instead.

This model is defined by :math:`y = \beta_0 x^2 + \beta_1 x + \beta_2`

Examples
--------
We can calculate orthogonal distance regression with a quadratic model:

>>> from scipy import odr
>>> import numpy as np
>>> x = np.linspace(0.0, 5.0)
>>> y = 1.0 * x ** 2 + 2.0 * x + 3.0
>>> data = odr.Data(x, y)
>>> odr_obj = odr.ODR(data, odr.quadratic)
>>> output = odr_obj.run()
>>> print(output.beta)
[1. 2. 3.]

c                \   < \         SV `  \        \        \        \
        R RRRRR/R7       R# )rE   	QuadraticrF   zy = B_0*x**2 + B_1*x + B_2rG   z&$y = \beta_0 x^2 + \beta_1 x + \beta_2rl   N)rL   rM   r{   r}   r   r   rN   s   &r   rM   _QuadraticModel.__init__E  s6    iy9+5GI 	 	Jr   rR   rS   r\   s   @@r   r   r   *  rn   r   r   )r   exponentialmultilinear	unilinear	quadraticrg   )"rX   numpyr   scipy.odr._odrpackr   __all__r   r   r    r'   r,   r/   r1   r7   r:   r<   rA   rC   r   rg   ri   r   rp   rr   rw   ry   r{   r}   r   r   r   r   r   r   rR   r   r   <module>r      s     $!3
$735##)

"H "HJ  !?'D J  JF  !*(
$(
 Ie  IF 	 Je  JF 	r   