From: Greg W. <gre...@gm...> - 2006-10-12 03:17:15
|
On 10/11/06, Travis Oliphant <oli...@ee...> wrote: > > Stefan van der Walt wrote: > >Further, if I understand correctly, changing sqrt and power to give > >the right answer by default will slow things down somewhat. But is it > >worth sacrificing intuitive usage for speed? > > > For NumPy, yes. > > This is one reason that NumPy by itself is not a MATLAB replacement. This is not about being a Matlab replacement. This is about correctness. Numpy purports to handle complex numbers. Mathematically, sqrt(-1) is a complex number. Therefore Numpy *must* return a complex number. Speed should not take precedence over correctness. If Numpy doesn't return a complex number then it shouldn't pretend to support complex numbers. Greg -- Linux. Because rebooting is for adding hardware. |