summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2008-08-27 03:17:51 +0000
committerCharles Harris <charlesr.harris@gmail.com>2008-08-27 03:17:51 +0000
commit88c8abb00f49bdabd3b336f0bf0a8efaf6887acd (patch)
treedc644b453fb7f9c225974aed6b4092d2a9c96a76 /numpy/core
parentd4a1e796a44cbfaf087e8ce8feee61ca42447aee (diff)
downloadnumpy-88c8abb00f49bdabd3b336f0bf0a8efaf6887acd.tar.gz
Revert r5698, r5699, and r5702 until build problems are fixed.
Fix ticket #878 differently.
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/code_generators/generate_umath.py6
-rw-r--r--numpy/core/src/arrayobject.c3
-rw-r--r--numpy/core/src/umathmodule.c.src28
3 files changed, 16 insertions, 21 deletions
diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py
index 6a36d6add..ba57d53e0 100644
--- a/numpy/core/code_generators/generate_umath.py
+++ b/numpy/core/code_generators/generate_umath.py
@@ -476,12 +476,6 @@ defdict = {
TD(flts, f='ceil'),
TD(M, f='ceil'),
),
-'trunc' :
- Ufunc(1, 1, None,
- docstrings.get('numpy.core.umath.trunc'),
- TD(flts, f='trunc'),
- TD(M, f='trunc'),
- ),
'fabs' :
Ufunc(1, 1, None,
docstrings.get('numpy.core.umath.fabs'),
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