4 ms·
In the specific case you pasted, the [] are just syntactic sugar to specify information about the arrays that you are passing in to Cython. I find that far mor
by Fede_V 12y ago
In the specific case you pasted, the [] are just syntactic sugar to specify information about the arrays that you are passing in to Cython.
I find that far more legible than complicated template expressions - but that's likely a matter of habit.
About the object lifetime: there is a lot of good information on the Cython webpage (although it is a bit spread out) - but usually, unless you are writing Cython only applications, I tend to write tight Cython numerical routines that take a pre-allocated input/output vector and just update the output vector.