pyacs.glinalg.solve.ls module

pyacs.glinalg.solve.ls.ls(G, d, verbose=False)[source]

Solve the least-squares problem min (Gm-d).T (Gm-d).

Parameters:
  • G (ndarray) – m x n model matrix (2D).

  • d (ndarray) – m observation vector (1D).

  • verbose (bool, optional) – Verbose mode.

Returns:

Solution m (1D, length n). chi2 available from lstsq internally.

Return type:

ndarray

Notes

Solved via numpy.linalg.lstsq.