[Numpy-discussion] Timings for various round functions

Sasha ndarray at mac.com
Wed Feb 22 23:39:03 CST 2006

On 2/23/06, Travis Oliphant <oliphant.travis at ieee.org> wrote:
> ...
> I think we have agreed that C99 functions are good candidates to become
> ufuncs.  The only problem is figuring out what to do on platforms that
> don't define them.

I was going to ask this question myself, but then realized that the
answer is in the source code: for functions missing on a platform
numpy provides its own implementations.  (See for example a comment in
umathmodule "if C99 extensions not available then define dummy
functions...") I was going to just use rint instead of round and
nearbyint on platforms that dont have them.

> For example, we could define a separate module of C99 functions that is
> only available on certain platforms.

This is certainly the easiest to implement option, but we don't want
make numpy users  worry about portability of their code.

More information about the Numpy-discussion mailing list