<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lstsq(A, b):
 r"""Return the least-squares solution to a linear matrix equation. Args: A (array_like):
 Coefficient matrix. b (array_like):
 Ordinate values. Returns: :class:`numpy.ndarray`: Least-squares solution. """

    A = asarray(A, float)
    b = asarray(b, float)

    if A.ndim == 1:
        A = A[:, newaxis]

    if A.shape[1] == 1:
        return dot(A.T, b) / squeeze(dot(A.T, A))

    rcond = finfo(double).eps * max(*A.shape)
    return npy_lstsq(A, b, rcond=rcond)[0]