String (and unicode) comparisons and per-thread error handling fixed
String comparisons were added last week. Today, I added per-thread error handling to NumPy. There is 1 more enhancement (scalar math) prior to 0.9.8 release --- but it will probably take 1-2 weeks. The new error handling means that the three-scope system is gone. Now, there is only one per-Python-thread global scope for error handling. If you change the error handling it will affect all ufuncs. Because of this, the seterr function now returns an object with the old error-handling information. This object must be passed to umath.seterrobj() in order to restore the error handling. -Travis
Travis Oliphant wrote:
String comparisons were added last week. Today, I added per-thread error handling to NumPy. There is 1 more enhancement (scalar math) prior to 0.9.8 release --- but it will probably take 1-2 weeks.
Oops! I'm about 2/3 done doing this one too. I think I'll go ahead and finish mine up and see how our approaches stack up performance wise and see if there's any of mine that's useful to roll into yours. -tim
The new error handling means that the three-scope system is gone. Now, there is only one per-Python-thread global scope for error handling. If you change the error handling it will affect all ufuncs. Because of this, the seterr function now returns an object with the old error-handling information. This object must be passed to umath.seterrobj() in order to restore the error handling.
-Travis
------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Tim Hochberg wrote:
Travis Oliphant wrote:
String comparisons were added last week. Today, I added per-thread error handling to NumPy. There is 1 more enhancement (scalar math) prior to 0.9.8 release --- but it will probably take 1-2 weeks.
Oops! I'm about 2/3 done doing this one too. I think I'll go ahead and finish mine up and see how our approaches stack up performance wise and see if there's any of mine that's useful to roll into yours. Darn. I thought I gave you enough time.... :-)
On the other hand, all I did was change the way the error-mode is being looked-up (from the three dictionaries to just one). It's not much different than before except for that. I didn't do anything about the other ideas you spoke of. I did add a simple object to reset the error mode when it gets deleted, and had to fiddle with the seterr code a little to accept that object so that both methods of resetting the error mode work. A stack can certainly be built on top of what is now there (I'm thinking for numarray compatibility...), but I didn't do that. Sorry for stepping on your toes. I'm just anxious... I'll be gone for a couple of days and won't be working on NumPy/SciPy, so feel free to adjust. -Travis
participants (2)
-
Tim Hochberg
-
Travis Oliphant