On Sat, Aug 23, 2014 at 12:40 AM, James Crist wrote:
> I suspected as much. This is actually part of my work on numerical
> evaluation in SymPy. In its current state compilation to C and autowrapping
> *works*, but I think it could definitely be more versatile/efficient. Since
> numpy seemed to ha
You can always write your own gufunc with signature '(),(),()->(a, a)', and
write a Python wrapper that always call it with an `out=` parameter of
shape (..., 3, 3), something along the lines of:
def my_wrapper(a, b, c, out=None):
if out is None:
out = np.empty(np.broadcast(a,b,c).shap
I suspected as much. This is actually part of my work on numerical
evaluation in SymPy. In its current state compilation to C and autowrapping
*works*, but I think it could definitely be more versatile/efficient. Since
numpy seemed to have solved the broadcasting/datatype issues internally I
hoped
On Thu, Aug 21, 2014 at 2:34 AM, James Crist wrote:
> All,
>
> I have a C function func that takes in scalar arguments, and an array of
> fixed dimension that is modified in place to provide the output. The
> prototype is something like:
>
> `void func(double a, double b, double c, double *arr);`
All,
I have a C function func that takes in scalar arguments, and an array of
fixed dimension that is modified in place to provide the output. The
prototype is something like:
`void func(double a, double b, double c, double *arr);`
I've wrapped this in Cython and called it from python with no pr