Dave Hirschfeld <dave.hirschfeld@...> writes: > > Dave Hirschfeld <dave.hirschfeld@...> writes: > > > > > Using the following test code: > <snip> > > > > So, it seems either typing the array as a memview or printing res > > will screw up the calculation. > > > > The cython code is given below. Any ideas if this is a cython bug or something > > I'm doing wrong? > > > > Thanks, > > Dave > > > > To answer my own question, it can't be that a simple print statement will > change the program so I must be doing something wrong! It makes it hard > to track down when it gives the right answer most of the time and segfaults > randomly when nothing seems to have changed. I'm sure it's just incorrect > arguments to dgelsy so I'll look into that... > > -Dave > >
And for those following, the obvious error was in using the double `worksize` instead of the array of size n, `work` in the 2nd call to DGELSY. DGELSY(&m, &n, &nrhs, &A[0,0], &lda, &res[0], &ldb, &jpvt[0], &rcond, &rank, &worksize, &lwork, &info) Sorry for the noise. -Dave _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel