python 3.x - Using c++ complex functions in Cython -
i trying complex exponential in cython. i have been able cobble following code pyx : from libc.math cimport sin, cos, acos, exp, sqrt, fabs, m_pi, floor, ceil cdef extern "complex.h": double complex cexp(double complex z) import numpy np cimport numpy np import cython cython.parallel cimport prange, parallel def try_cexp(): cdef: double complex rr1 double complex rr2 rr1 = 1j rr2 = 2j print(rr1*rr2) #print(cexp(rr1)) note print(cexp(rr1)) commented. when line active, following error when running setup.py : error: command 'c:\\winpython\\winpython-64bit-3.4.3.6\\python-3.4.3.amd64\\scripts\\gcc.exe' failed exit status 1 note when cexp commented out, runs expected... can run setup.py , , when test function prints out product of 2 complex numbers. here setup.py file. note includes code run openmp in cython using g++: from distutils.core import setup cython.build import cythonize distutils.extension import...