> You're stack-allocating your array, so the memory is getting recycled for
> other uses as soon as your C function returns. You should malloc it instead
> (but you don't have to worry about free'ing it, numpy will do that when the
> array object is deconstructed). Any C reference will fill you in
Hello,
I'm having issues with performing operations on an array in C and
passing it back to Python. The array values seem to become unitialized
upon being passed back to Python. My first attempt involved initializing
the array in C as so:
double a_fin[max_mth];
where max_mth is an int. I fill in
> The issue is that there are some minor (10^-16) differences in the
> values when I do the calculation in C vs Python.
>
> That is the order of the machine epsilon for double, that looks like roundoff
> errors to me.
Hi Daπid,
Thanks for the reply. That does make sense.
I'm trying t
Hi all,
First time posting.
I've been working on a class for solving a group of affine models and
decided to drop down to C for a portion of the code for improved
performance.
There are two questions that I've had come up from this.
1) I've written the section of code, which involved a series o