From: Ivan V. i B. <iv...@ca...> - 2006-05-23 12:51:36
|
En/na Pujo Aji ha escrit:: > Numpy optimize the python process by explicitly define the element type= > of array. > Just like C++. > > Python let you work with automatic converting... but it slows down the > process. > Like having extra code to check the type of your element array. > > I suggest you check the numpy reference instead of python reference the= n > using numpy. OK, I see that predictability of the type of the output result matters. ;) Besides that, I've been told that, according to the manual, power() (as every other ufunc) uses its ``types`` member to find out the type of the result depending only on the types of its arguments. It makes sense to avoid checking for particular values with possibly large arrays for efficiency, as you point out. I expected Python-like behaviour, but I understand this is not the most appropriate thing to do for a high-performace package (but then, I was not able to find out using the public docs). Thanks for your help, :: Ivan Vilata i Balaguer >qo< http://www.carabos.com/ C=C3=A1rabos Coop. V. V V Enjoy Data "" |