Robert Kern wrote: > Bruce Sherwood wrote: >> There is also the question of >> whether it would pay for numpy to make what is probably an exceedingly >> fast check and do much faster calculations of sqrt(scalar) and other >> such mathematical functions. > > There is no question that it would pay. It takes time and effort to implement, > though.
There is a question of whether it would pay enough to be worth the time and effort. For most use (at least most of my use), I'm either working with a small number of scalars, and performance is a non-issue, or I"m working with arrays of data, and then I need the numpy versions. So I really don't see the point of optimizing for scalar arguments. IIUC, the issue at hand involved not a desire for a faster sqrt(scalar), but rather an interaction with C++ code that didn't efficiently deal with numpy scalars -- that's a totally different issue, one that may have been solved by using math.sqrt() to avoid the numpy scalar, but not one that would that provides an argument for cluttering up numpy with this sort of special casing. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion