Commit e35311ab authored by serge-sans-paille's avatar serge-sans-paille Committed by Stefan Behnel

Fix pythran include path for numpy math functions

Plus Start filling unit test cases
parent 9e73632f
......@@ -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