def hsolve(A00, A01, A11, y0, y1):
from numpy_sugar import epsilon<EOL>n = _norm(A00, A01)<EOL>u0 = A00 - n<EOL>u1 = A01<EOL>nu = _norm(u0, u1)<EOL>with errstate(invalid="<STR_LIT:ignore>", divide="<STR_LIT:ignore>"):<EOL><INDENT>v0 = nan_to_num(u0 / nu)<EOL>v1 = nan_to_num(u1 / nu)<EOL><DEDENT>B00 = <NUM_LIT:1> - <NUM_LIT:2> * v0 * v0<EOL>B01 = <NUM_LIT:0> - <NUM_LIT:2> * v0 * v1<EOL>B11 = <NUM_LIT:1> - <NUM_LIT:2> * v1 * v1<EOL>D00 = B00 * A00 + B01 * A01<EOL>D01 = B00 * A01 + B01 * A11<EOL>D11 = B01 * A01 + B11 * A11<EOL>b0 = y0 - <NUM_LIT:2> * y0 * v0 * v0 - <NUM_LIT:2> * y1 * v0 * v1<EOL>b1 = y1 - <NUM_LIT:2> * y0 * v1 * v0 - <NUM_LIT:2> * y1 * v1 * v1<EOL>n = _norm(D00, D01)<EOL>u0 = D00 - n<EOL>u1 = D01<EOL>nu = _norm(u0, u1)<EOL>with errstate(invalid="<STR_LIT:ignore>", divide="<STR_LIT:ignore>"):<EOL><INDENT>v0 = nan_to_num(u0 / nu)<EOL>v1 = nan_to_num(u1 / nu)<EOL><DEDENT>E00 = <NUM_LIT:1> - <NUM_LIT:2> * v0 * v0<EOL>E01 = <NUM_LIT:0> - <NUM_LIT:2> * v0 * v1<EOL>E11 = <NUM_LIT:1> - <NUM_LIT:2> * v1 * v1<EOL>F00 = E00 * D00 + E01 * D01<EOL>F01 = E01 * D11<EOL>F11 = E11 * D11<EOL>F11 = (npy_abs(F11) > epsilon.small) * F11<EOL>with errstate(divide="<STR_LIT:ignore>", invalid="<STR_LIT:ignore>"):<EOL><INDENT>Fi00 = nan_to_num(F00 / F00 / F00)<EOL>Fi11 = nan_to_num(F11 / F11 / F11)<EOL>Fi10 = nan_to_num(-(F01 / F00) * Fi11)<EOL><DEDENT>c0 = Fi00 * b0<EOL>c1 = Fi10 * b0 + Fi11 * b1<EOL>x0 = E00 * c0 + E01 * c1<EOL>x1 = E01 * c0 + E11 * c1<EOL>return array([x0, x1])<EOL>
Solver for the linear equations of two variables and equations only.

It uses Householder reductions to solve A𝐱 = 𝐲 in a robust manner.

Parameters
----------
A : array_like
    Coefficient matrix.
y : array_like
    Ordinate values.

Returns
-------
ndarray
    Solution 𝐱.