-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hessian preconditioner wrappers #410
base: master
Are you sure you want to change the base?
Conversation
d->o = this; d->f = f; d->f_data = f_data; d->mf = NULL; d->vf = NULL; | ||
d->pf = pf; | ||
d->munge_destroy = md; d->munge_copy = mc; | ||
printf("ALEC\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this line is an artifact of some debugging?
static void pfunc_python(unsigned n, const double *x, const double *v, double *vpre, void *f) | ||
{ | ||
npy_intp sz = npy_intp(n), sz0 = 0, stride1 = sizeof(double); | ||
PyObject *xpy = PyArray_New(&PyArray_Type, 1, &sz, NPY_DOUBLE, &stride1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like these calls are equivalent to calling PyArray_SimpleNewFromData
?
const_cast<double*>(v), // not NPY_WRITEABLE | ||
0, NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED, NULL); | ||
PyObject *vprepy = vpre | ||
? PyArray_SimpleNewFromData(1, &sz, NPY_DOUBLE, vpre) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't vpre
always be non-NULL
here?
hello @smartalecH, any news on this ? |
Closes #177
There's still an issue with the python wrappers. Seems to be passing the wrong number of arguments:
Any ideas what might be wrong?