[Cython] aritmetic with arrays in Cython

Ian Henriksen insertinterestingnamehere at gmail.com
Fri Aug 8 00:58:26 CEST 2014


Nice module! That seems to implement most of the basic functionality I've
seen lacking. Ideally, I'm still trying to find a way to be able to do
something syntactically like this:

cpdef whateverfunction(double[:] a, float[:] b):
    return a + a * b + .5

It would be ideal if that sort of thing were already a part of Cython. All
things considered though, most of what I'm looking for seems to be there.

Thanks!

-Ian Henriksen


On Thu, Aug 7, 2014 at 1:58 AM, Matěj Laitl <matej at laitl.cz> wrote:

> On Monday 04 of August 2014 13:11:13 Ian Henriksen wrote:
> > 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.
>
> Hi,
> you may also check out https://github.com/strohel/Ceygen if it would suit
> your
> needs.
>
> Cheers,
>         Matěj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20140807/8b598b34/attachment.html>


More information about the cython-devel mailing list