403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.37
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/scipy/optimize/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/scipy/optimize/__pycache__/_nnls.cpython-311.pyc
�

d�c���4�ddlmZddlmZmZmZdgZdd�ZdS)�)�__nnls�)�asarray_chkfinite�zeros�double�nnlsNc
��tt||f��\}}t|j��dkrt	dd|j��z���t|j��dkrt	dd|j��z���|j\}}||jdkr$t	dd	|�d
|jdf��z���|�dnt|��}t
|ft�
��}t
|ft�
��}t
|ft
�
��}tj	||||||||��\}}	}
|
dkrtd���||	fS)a�
    Solve ``argmin_x || Ax - b ||_2`` for ``x>=0``. This is a wrapper
    for a FORTRAN non-negative least squares solver.

    Parameters
    ----------
    A : ndarray
        Matrix ``A`` as shown above.
    b : ndarray
        Right-hand side vector.
    maxiter: int, optional
        Maximum number of iterations, optional.
        Default is ``3 * A.shape[1]``.

    Returns
    -------
    x : ndarray
        Solution vector.
    rnorm : float
        The residual, ``|| Ax-b ||_2``.

    See Also
    --------
    lsq_linear : Linear least squares with bounds on the variables

    Notes
    -----
    The FORTRAN code was published in the book below. The algorithm
    is an active set method. It solves the KKT (Karush-Kuhn-Tucker)
    conditions for the non-negative least squares problem.

    References
    ----------
    Lawson C., Hanson R.J., (1987) Solving Least Squares Problems, SIAM

     Examples
    --------
    >>> import numpy as np
    >>> from scipy.optimize import nnls
    ...
    >>> A = np.array([[1, 0], [1, 0], [0, 1]])
    >>> b = np.array([2, 1, 1])
    >>> nnls(A, b)
    (array([1.5, 1. ]), 0.7071067811865475)

    >>> b = np.array([-1, -1, -1])
    >>> nnls(A, b)
    (array([0., 0.]), 1.7320508075688772)

    �z)Expected a two-dimensional array (matrix)z, but the shape of A is rz)Expected a one-dimensional array (vector)z, but the shape of b is rz0Incompatible dimensions. The first dimension of zA is z, while the shape of b is N���)�dtypeztoo many iterations)�mapr�len�shape�
ValueError�intrrrr�RuntimeError)�A�b�maxiter�m�n�w�zz�index�x�rnorm�modes           �6/usr/lib/python3/dist-packages/scipy/optimize/_nnls.pyrrs���h� �1�a�&�)�)�D�A�q�
�1�7�|�|�q����D�D�9:���C�D�E�E�	E�
�1�7�|�|�q����D�D�9:���C�D�E�E�	E�
�7�D�A�q��A�G�A�J����B�B�9:���Q�W�Q�Z�N�N�K�L�M�M�	M��O�b�b��W���G�
�q�d�&�!�!�!�A�	��t�6�	"�	"�	"�B��1�$�c�"�"�"�E��[��A�q�!�Q��E�7�C�C�N�A�u�d��q�y�y��0�1�1�1��e�8�O�)N)�r�numpyrrr�__all__r�rr�<module>r$s`��������2�2�2�2�2�2�2�2�2�2��(��N�N�N�N�N�Nr

Youez - 2016 - github.com/yon3zu
LinuXploit