This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / optimize / _slsqplib / nnls

built-in

scipy.optimize._slsqplib:nnls

Signature

built-innnls(A, b, maxiter)

Summary

Nonnegative least squares solver.

Extended Summary

Solves the constrained optimization problem min ||A x - b||_2 subject to x >= 0.

Parameters

A : ndarray, shape (m, n)

Coefficient matrix, float64.

b : ndarray, shape (m,) or (m, 1)

Right-hand side vector, float64.

maxiter : int

Maximum number of iterations.

Returns

x : ndarray, shape (n,)

Solution vector.

rnorm : float

Residual norm ||A x - b||_2.

info : int

Exit status. 0 indicates successful convergence.

Aliases

  • scipy.optimize._nnls._nnls