Skip to content

Commit

Permalink
Don't use C99 complex.h in interpnd
Browse files Browse the repository at this point in the history
  • Loading branch information
cgohlke committed Feb 2, 2013
1 parent c59f3a3 commit fa4d7a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scipy/interpolate/interpnd.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ import warnings
# Numpy etc.
#------------------------------------------------------------------------------

cdef extern from "complex.h":
# Need to be included so that complex types work
pass

cdef extern from "math.h":
double sqrt(double x) nogil
double fabs(double a) nogil
Expand Down Expand Up @@ -262,7 +258,11 @@ class LinearNDInterpolator(NDInterpolatorBase):
for j in xrange(ndim+1):
for k in xrange(nvalues):
m = simplices[isimplex,j]
out[i,k] += c[j] * values[m,k]
if double_or_complex is double:
out[i,k] += c[j] * values[m,k]
else:
out[i,k].real += c[j] * values[m, k].real
out[i,k].imag += c[j] * values[m, k].imag

return out

Expand Down

0 comments on commit fa4d7a8

Please sign in to comment.