summaryrefslogtreecommitdiff
path: root/numpy/lib/src/_compiled_base.c
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2006-06-30 12:21:17 +0000
committerStefan van der Walt <stefan@sun.ac.za>2006-06-30 12:21:17 +0000
commit2b06537f480da6c75666b8c3ed8e45aa2aef6e59 (patch)
tree8316c9637570611808c4881adbcefcfe479b850a /numpy/lib/src/_compiled_base.c
parentbbabc5c6e3ac6356056ec3f997c81bd430f3214b (diff)
downloadnumpy-2b06537f480da6c75666b8c3ed8e45aa2aef6e59.tar.gz
Cast to double instead of float in digitize.
Diffstat (limited to 'numpy/lib/src/_compiled_base.c')
-rw-r--r--numpy/lib/src/_compiled_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/src/_compiled_base.c b/numpy/lib/src/_compiled_base.c
index 4878abb49..1ba1aa742 100644
--- a/numpy/lib/src/_compiled_base.c
+++ b/numpy/lib/src/_compiled_base.c
@@ -190,11 +190,11 @@ arr_digitize(PyObject *self, PyObject *args, PyObject *kwds)
m = monotonic_ (dbins, lbins) ;
if ( m == -1 ) {
for ( i = 0 ; i < lx ; i ++ )
- iret [i] = decr_slot_ (dx [i], dbins, lbins) ;
+ iret [i] = decr_slot_ ((double)dx [i], dbins, lbins) ;
}
else if ( m == 1 ) {
for ( i = 0 ; i < lx ; i ++ )
- iret [i] = incr_slot_ ((float)dx [i], dbins, lbins) ;
+ iret [i] = incr_slot_ ((double)dx [i], dbins, lbins) ;
}
else Py_Assert(0, "bins must be montonically increasing or decreasing");
}