diff options
Diffstat (limited to 'numpy/core/src')
-rw-r--r-- | numpy/core/src/arrayobject.c | 3 | ||||
-rw-r--r-- | numpy/core/src/umathmodule.c.src | 28 |
2 files changed, 16 insertions, 15 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 586e7081a..ad3cbc4f2 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -3351,7 +3351,6 @@ typedef struct { *logical_and, *floor, *ceil, - *trunc, *maximum, *minimum, *rint, @@ -3409,7 +3408,6 @@ PyArray_SetNumericOps(PyObject *dict) SET(logical_and); SET(floor); SET(ceil); - SET(trunc); SET(maximum); SET(minimum); SET(rint); @@ -3460,7 +3458,6 @@ PyArray_GetNumericOps(void) GET(logical_and); GET(floor); GET(ceil); - GET(trunc); GET(maximum); GET(minimum); GET(rint); diff --git a/numpy/core/src/umathmodule.c.src b/numpy/core/src/umathmodule.c.src index 1517449a6..bef419bbd 100644 --- a/numpy/core/src/umathmodule.c.src +++ b/numpy/core/src/umathmodule.c.src @@ -302,10 +302,10 @@ static double hypot(double x, double y) } #endif - #ifndef HAVE_RINT +/* needs cleanup */ static double -rint (double x) +rint(double x) { double y, r; @@ -326,20 +326,24 @@ rint (double x) } #endif +/* + * Comment out trunc definition until build problems are fixed. + */ +/* #ifndef HAVE_TRUNC static double -trunc (double x) +trunc(double x) { - double y, r; - if (x < 0) { - return - floor(-x); - } else { - return x; + return -floor(-x); + } + else { + return floor(x); } } #endif +*/ @@ -475,10 +479,10 @@ longdouble radiansl(longdouble x) { /**begin repeat - #kind=(sin,cos,tan,sinh,cosh,tanh,fabs,floor,ceil,trunc,sqrt,log10,log,exp,asin,acos,atan,rint)*2# - #typ=longdouble*18, float*18# - #c=l*18,f*18# - #TYPE=LONGDOUBLE*18, FLOAT*18# + #kind=(sin,cos,tan,sinh,cosh,tanh,fabs,floor,ceil,sqrt,log10,log,exp,asin,acos,atan,rint)*2# + #typ=longdouble*17, float*17# + #c=l*17,f*17# + #TYPE=LONGDOUBLE*17, FLOAT*17# */ #ifndef HAVE_@TYPE@_FUNCS |