logo       

argmax & py2exe: msg#00009

python.numeric.general

Subject: argmax & py2exe


I just ran into a little snag using py2exe with CVS numarray: argmax breaks in py2exe packaged programs although it works fine when run normally. My believe is that py2exe is getting confused by the trick of using 'import numeric' inside the function argmax, which I believe is there to avoid circular imports. In any event, generic.argmax and numarraycore.NumArray.argmax mysteriously ending up calling each other recursively until the recursion limit is exceeded.

This is almost certainly a problem with py2exe, not with numarray, but since circular imports are sort of bad form and since numarray side of things is almost certainly easier to to fix, I though I'd try to persuade you, the numarray developers, to reorganize argmax so the circular imports go away.

I think that this is mostly a matter of moving the numeric.argmax/argmin code into NumArray.argmax/argmin and then numeric.argmax/argmin can just call a.argmax/a.argmin on the array a that it is passed./

-tim



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise