Commit 7c938b42 authored by Stefan Behnel's avatar Stefan Behnel Committed by GitHub

Merge pull request #2702 from serge-sans-paille/fix/pythran-includes

Fix pythran include path for numpy math functions
parents b876e806 6178a049
......@@ -201,7 +201,7 @@ def is_pythran_buffer(type_):
def pythran_get_func_include_file(func):
func = np_func_to_list(func)
return "pythonic/include/numpy/%s.hpp" % "/".join(func)
return "pythonic/numpy/%s.hpp" % "/".join(func)
def include_pythran_generic(env):
# Generic files
......
# mode: run
# tag: pythran, numpy, cpp
# cython: np_pythran=True
import numpy as np
cimport numpy as np
def trigo(np.ndarray[double, ndim=1] angles):
"""
>>> a = np.array([0., np.pi, np.pi *2])
>>> trigo(a)
array([ 1., -1., 1.])
"""
return np.cos(angles)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment