Re: [Numpy-discussion] numpy and math sqrt timings

2007-12-28 Thread Matthieu Brucher
Hi, This is a know fact, you should use Python default functions if you have only one value. If Numpy uses math.sqrt for floatting point number, it would have to use cmath for complex values as well. Now, I don't know if an additionnal test will slow down Numpy, if this is the case, then we should

[Numpy-discussion] numpy and math sqrt timings

2007-12-28 Thread Bruce Sherwood
On the VPython list Scott Daniels suggested using try/except to deal with the problem of sqrt(5.5) being numpy.float64 and thereby making sqrt(5.5)*(VPython vector) not a (VPython vector), which ends up as a big performance hit on existing programs. I tried his suggestion and did some timing us