summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/code_generators/generate_umath.py10
-rw-r--r--numpy/core/src/umath/ufunc_object.c12
2 files changed, 11 insertions, 11 deletions
diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py
index b018e1948..599ffddc8 100644
--- a/numpy/core/code_generators/generate_umath.py
+++ b/numpy/core/code_generators/generate_umath.py
@@ -261,8 +261,8 @@ defdict = {
docstrings.get('numpy.core.umath.multiply'),
'PyUFunc_MultiplicationTypeResolution',
TD(notimes_or_obj),
- [TypeDescription('m', FullTypeDescr, 'm' + int64, 'm'),
- TypeDescription('m', FullTypeDescr, int64 + 'm', 'm'),
+ [TypeDescription('m', FullTypeDescr, 'mq', 'm'),
+ TypeDescription('m', FullTypeDescr, 'qm', 'm'),
TypeDescription('m', FullTypeDescr, 'md', 'm'),
TypeDescription('m', FullTypeDescr, 'dm', 'm'),
],
@@ -273,7 +273,7 @@ defdict = {
docstrings.get('numpy.core.umath.divide'),
'PyUFunc_DivisionTypeResolution',
TD(intfltcmplx),
- [TypeDescription('m', FullTypeDescr, 'm' + int64, 'm'),
+ [TypeDescription('m', FullTypeDescr, 'mq', 'm'),
TypeDescription('m', FullTypeDescr, 'md', 'm'),
],
TD(O, f='PyNumber_Divide'),
@@ -283,7 +283,7 @@ defdict = {
docstrings.get('numpy.core.umath.floor_divide'),
'PyUFunc_DivisionTypeResolution',
TD(intfltcmplx),
- [TypeDescription('m', FullTypeDescr, 'm' + int64, 'm'),
+ [TypeDescription('m', FullTypeDescr, 'mq', 'm'),
TypeDescription('m', FullTypeDescr, 'md', 'm'),
],
TD(O, f='PyNumber_FloorDivide'),
@@ -295,7 +295,7 @@ defdict = {
TD('bBhH', out='d'),
TD('iIlLqQ', out='d'),
TD(flts+cmplx),
- [TypeDescription('m', FullTypeDescr, 'm' + int64, 'm'),
+ [TypeDescription('m', FullTypeDescr, 'mq', 'm'),
TypeDescription('m', FullTypeDescr, 'md', 'm'),
],
TD(O, f='PyNumber_TrueDivide'),
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index 36dea2c83..009876bab 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -2635,7 +2635,7 @@ PyUFunc_MultiplicationTypeResolution(PyUFuncObject *ufunc,
if (PyTypeNum_ISINTEGER(type_num2) || PyTypeNum_ISBOOL(type_num2)) {
out_dtypes[0] = PyArray_DESCR(operands[0]);
Py_INCREF(out_dtypes[0]);
- out_dtypes[1] = PyArray_DescrNewFromType(NPY_INT64);
+ out_dtypes[1] = PyArray_DescrNewFromType(NPY_LONGLONG);
if (out_dtypes[1] == NULL) {
Py_DECREF(out_dtypes[0]);
out_dtypes[0] = NULL;
@@ -2644,7 +2644,7 @@ PyUFunc_MultiplicationTypeResolution(PyUFuncObject *ufunc,
out_dtypes[2] = out_dtypes[0];
Py_INCREF(out_dtypes[2]);
- type_num2 = NPY_INT64;
+ type_num2 = NPY_LONGLONG;
}
/* m8[<A>] * float## => m8[<A>] * float64 */
else if (PyTypeNum_ISFLOAT(type_num2)) {
@@ -2668,7 +2668,7 @@ PyUFunc_MultiplicationTypeResolution(PyUFuncObject *ufunc,
else if (PyTypeNum_ISINTEGER(type_num1) || PyTypeNum_ISBOOL(type_num1)) {
/* int## * m8[<A>] => int64 * m8[<A>] */
if (type_num2 == NPY_TIMEDELTA) {
- out_dtypes[0] = PyArray_DescrNewFromType(NPY_INT64);
+ out_dtypes[0] = PyArray_DescrNewFromType(NPY_LONGLONG);
if (out_dtypes[0] == NULL) {
return -1;
}
@@ -2677,7 +2677,7 @@ PyUFunc_MultiplicationTypeResolution(PyUFuncObject *ufunc,
out_dtypes[2] = out_dtypes[1];
Py_INCREF(out_dtypes[2]);
- type_num1 = NPY_INT64;
+ type_num1 = NPY_LONGLONG;
}
else {
goto type_reso_error;
@@ -2782,7 +2782,7 @@ PyUFunc_DivisionTypeResolution(PyUFuncObject *ufunc,
if (PyTypeNum_ISINTEGER(type_num2)) {
out_dtypes[0] = PyArray_DESCR(operands[0]);
Py_INCREF(out_dtypes[0]);
- out_dtypes[1] = PyArray_DescrNewFromType(NPY_INT64);
+ out_dtypes[1] = PyArray_DescrNewFromType(NPY_LONGLONG);
if (out_dtypes[1] == NULL) {
Py_DECREF(out_dtypes[0]);
out_dtypes[0] = NULL;
@@ -2791,7 +2791,7 @@ PyUFunc_DivisionTypeResolution(PyUFuncObject *ufunc,
out_dtypes[2] = out_dtypes[0];
Py_INCREF(out_dtypes[2]);
- type_num2 = NPY_INT64;
+ type_num2 = NPY_LONGLONG;
}
/* m8[<A>] / float## => m8[<A>] / float64 */
else if (PyTypeNum_ISFLOAT(type_num2)) {