[Numpy-discussion] argmax & py2exe
Tim Hochberg
tim.hochberg at cox.net
Thu Aug 5 10:06:04 CDT 2004
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
More information about the Numpy-discussion
mailing list