diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-09-07 18:30:59 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-10-01 09:43:09 -0600 |
commit | e1a66b674e4f1f04a94b4bfc412d58045d64406a (patch) | |
tree | 3f16c6a4e587f0dea0255e8b6db5d404d912622f | |
parent | f0d8fede3ae93c5e07257d176d275393fc66abd7 (diff) | |
download | numpy-e1a66b674e4f1f04a94b4bfc412d58045d64406a.tar.gz |
BUG: datetime: Fix timedelta / timedelta -> float64 on Python 3
-rw-r--r-- | numpy/core/code_generators/generate_umath.py | 2 | ||||
-rw-r--r-- | numpy/core/src/umath/loops.h | 14 | ||||
-rw-r--r-- | numpy/core/src/umath/loops.h.src | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py index 7159d9896..8864ab27e 100644 --- a/numpy/core/code_generators/generate_umath.py +++ b/numpy/core/code_generators/generate_umath.py @@ -287,6 +287,7 @@ defdict = { TD(intfltcmplx), [TypeDescription('m', FullTypeDescr, 'mq', 'm'), TypeDescription('m', FullTypeDescr, 'md', 'm'), + TypeDescription('m', FullTypeDescr, 'mm', 'd'), ], TD(O, f='PyNumber_FloorDivide'), ), @@ -299,6 +300,7 @@ defdict = { TD(flts+cmplx), [TypeDescription('m', FullTypeDescr, 'mq', 'm'), TypeDescription('m', FullTypeDescr, 'md', 'm'), + TypeDescription('m', FullTypeDescr, 'mm', 'd'), ], TD(O, f='PyNumber_TrueDivide'), ), diff --git a/numpy/core/src/umath/loops.h b/numpy/core/src/umath/loops.h index 9b16ed3fc..192297a29 100644 --- a/numpy/core/src/umath/loops.h +++ b/numpy/core/src/umath/loops.h @@ -2668,8 +2668,10 @@ TIMEDELTA_mm_d_divide(char **args, intp *dimensions, intp *steps, void *NPY_UNUS #define TIMEDELTA_mq_m_true_divide TIMEDELTA_mq_m_divide #define TIMEDELTA_md_m_true_divide TIMEDELTA_md_m_divide +#define TIMEDELTA_mm_d_true_divide TIMEDELTA_mm_d_divide #define TIMEDELTA_mq_m_floor_divide TIMEDELTA_mq_m_divide #define TIMEDELTA_md_m_floor_divide TIMEDELTA_md_m_divide +#define TIMEDELTA_mm_d_floor_divide TIMEDELTA_mm_d_divide #define TIMEDELTA_fmin TIMEDELTA_minimum #define TIMEDELTA_fmax TIMEDELTA_maximum #define DATETIME_fmin DATETIME_minimum @@ -2681,27 +2683,27 @@ TIMEDELTA_mm_d_divide(char **args, intp *dimensions, intp *steps, void *NPY_UNUS ***************************************************************************** */ -#line 514 +#line 516 NPY_NO_EXPORT void OBJECT_equal(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func)); -#line 514 +#line 516 NPY_NO_EXPORT void OBJECT_not_equal(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func)); -#line 514 +#line 516 NPY_NO_EXPORT void OBJECT_greater(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func)); -#line 514 +#line 516 NPY_NO_EXPORT void OBJECT_greater_equal(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func)); -#line 514 +#line 516 NPY_NO_EXPORT void OBJECT_less(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func)); -#line 514 +#line 516 NPY_NO_EXPORT void OBJECT_less_equal(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func)); diff --git a/numpy/core/src/umath/loops.h.src b/numpy/core/src/umath/loops.h.src index 0b59b3095..24e5ef9fc 100644 --- a/numpy/core/src/umath/loops.h.src +++ b/numpy/core/src/umath/loops.h.src @@ -494,8 +494,10 @@ TIMEDELTA_mm_d_divide(char **args, intp *dimensions, intp *steps, void *NPY_UNUS #define TIMEDELTA_mq_m_true_divide TIMEDELTA_mq_m_divide #define TIMEDELTA_md_m_true_divide TIMEDELTA_md_m_divide +#define TIMEDELTA_mm_d_true_divide TIMEDELTA_mm_d_divide #define TIMEDELTA_mq_m_floor_divide TIMEDELTA_mq_m_divide #define TIMEDELTA_md_m_floor_divide TIMEDELTA_md_m_divide +#define TIMEDELTA_mm_d_floor_divide TIMEDELTA_mm_d_divide #define TIMEDELTA_fmin TIMEDELTA_minimum #define TIMEDELTA_fmax TIMEDELTA_maximum #define DATETIME_fmin DATETIME_minimum |