[Numpy-discussion] argmax & py2exe

Tim Hochberg tim.hochberg at cox.net
Thu Aug 5 13:40:08 EDT 2004


Tim Hochberg wrote:

Please ignore this. The problem went away when I deleted numerics pyc 
files and started over. It's a mysterious phenomena, that I ran into 
once before with py2exe and stale pyc files. Very strange, but no time 
to dig into it now since things appear to be working again. Sorry for 
the confusion.

Although getting rid of those circular imports would still probably be 
good style.

-tim

>
> 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
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>






More information about the NumPy-Discussion mailing list