solving equation system

Cameron Laird claird at lairds.us
Mon Jul 17 10:08:54 EDT 2006


In article <1153141039.216694.51240 at b28g2000cwb.googlegroups.com>,
TG <girodt at gmail.com> wrote:
>Hi there.
>
>Anyone knows how to use numpy / scipy in order to solve this ?
>
>* A is an array of shape (n,)
>* X is a positive float number
>* B is an array of shape (n,)
>* O is an array of shape (n,) containing only zeros.
>
>A.X - B = O
>min(X)
>
>thanks.
>

In general, no X solves the equality, so it's easy to minimize X.

If A is a non-zero positive multiple of B, exactly one X solves
the equality, so it's again easy to minimize.

If A and B vanish, choose X as the smallest positive float.

I suspect you intended a slightly different problem.  It's hard 
to guess what it is.



More information about the Python-list mailing list