[Cython] aritmetic with arrays in Cython

Ian Henriksen insertinterestingnamehere at gmail.com
Mon Aug 4 21:11:13 CEST 2014


Hi all,
I noticed that some time ago there was a pull request (
https://github.com/cython/cython/pull/144) open that was trying to
implement basic arithmetic operations with arrays. This seems to have also
been proposed in CEP 518 (
https://github.com/cython/cython/wiki/enhancements-simd). What is the
status on this?

This is a feature I'd really like to see in Cython. I'd be happy to help
with it, though I don't currently know enough about the internals of Cython
to do it without some guidance. What would be the best way to do this? I've
had three ideas thus far that might allow something like this to work, but
I'd really like to get some second opinions before I get too far with any
of them.

1. Make these array operations available as a part of Cython's memory view
objects.

2. Write a Cython wrapper around a NumPy-like C++ library.
https://github.com/ContinuumIO/libdynd seems to be a good candidate, though
I'm not as familiar with it. (This doesn't strike me as something that
would be a part of the main Cython project, but it could be a good way to
make this sort of functionality available. It seems like a good way to
avoid a lot of duplicate work though.)

3. Write a Fortran backend for Cython that uses Fortran's arrays wherever
memory views are used.
(This could be a bit crazy, but with the iso_c_binding module, it might be
possible. It could also allow better optimizations for arrays to be applied
by the compiler.)

What would be the best way to go about this?

Thanks!

-Ian Henriksen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20140804/0e634981/attachment.html>


More information about the cython-devel mailing list