Heh,

On Thu, Jun 21, 2012 at 6:03 PM, Robert Kern <robert.k...@gmail.com> wrote:

> On Thu, Jun 21, 2012 at 3:59 PM, bob tnur <bobtnu...@gmail.com> wrote:
> > Hi all numpy fun;)
> > This question is already posted in stackoverflow by some people, I am
> just
> > thinking that numpy python will do this with trick;) I guess numpy will
> be
> > every ones choice as its popularity increases. The question is herein:
> >
> http://stackoverflow.com/questions/10074270/how-can-i-find-the-minimum-number-of-lines-needed-to-cover-all-the-zeros-in-a-2
>
> My "numpy solution" for this is just
>
>  $ pip install munkres
>
munkres seems to be a pure python implementation ;-).

FWIIW, There exists pure python implementation(s) to outperform
munkresimplementation more than 200 times already with a 100x100
random cost
matrix, based on shortest path variant of the Hungarian algorithm (more
details of the algorithms can be found for example at
http://www.assignmentproblems.com/).

How the assignment algorithms are (typically) described, it actually may be
quite a tedious job to create more performance ones utilizing numpy arrays
instead of lists of lists.


My 2 cents,
-eat

>
> http://pypi.python.org/pypi/munkres
>
> --
> Robert Kern
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to