Skip to content

Commit

Permalink
No fortran compiler necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcgibbo committed Oct 11, 2015
1 parent 95a2372 commit 87f3f62
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 1,080 deletions.
38 changes: 0 additions & 38 deletions quadprog/aind.f

This file was deleted.

69 changes: 0 additions & 69 deletions quadprog/daxpy.f

This file was deleted.

72 changes: 0 additions & 72 deletions quadprog/ddot.f

This file was deleted.

72 changes: 0 additions & 72 deletions quadprog/dpofa.f

This file was deleted.

64 changes: 0 additions & 64 deletions quadprog/dscal.f

This file was deleted.

40 changes: 0 additions & 40 deletions quadprog/fortranwrapper.c

This file was deleted.

8 changes: 4 additions & 4 deletions quadprog/quadprog.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import numpy as np
from libc.stdio cimport printf

cdef extern:
void qpgen2(double* dmat, double* dvec,int* fddmat,int* n,
void qpgen2_(double* dmat, double* dvec,int* fddmat,int* n,
double* sol, double* lagr, double* crval,
double* amat, double* bvec, int* fdamat,
int* q, int* meq, int* iact, int* nact, int* iter,
Expand Down Expand Up @@ -94,9 +94,9 @@ def solve_qp(double[:, :] G, double[:] a, double[:, :] C=None, double[:] b=None,
else:
ierr = 0

qpgen2(&G_[0,0], &a_[0], &n1, &n1, &sol[0], &lagr[0],
&crval, &C_[0, 0], &b_[0], &n1, &m1, &meq, &iact[0],
&nact, &iters[0], &work[0], &ierr)
qpgen2_(&G_[0,0], &a_[0], &n1, &n1, &sol[0], &lagr[0],
&crval, &C_[0, 0], &b_[0], &n1, &m1, &meq, &iact[0],
&nact, &iters[0], &work[0], &ierr)

if ierr == 1:
raise ValueError('constraints are inconsistent, no solution')
Expand Down
Loading

0 comments on commit 87f3f62

Please sign in to comment.