diff options
-rw-r--r-- | scipy/base/code_generators/generate_ufunc_api.py | 4 | ||||
-rw-r--r-- | scipy/base/include/scipy/ufuncobject.h | 1 | ||||
-rw-r--r-- | scipy/base/numeric.py | 3 | ||||
-rw-r--r-- | scipy/base/src/multiarraymodule.c | 2 | ||||
-rw-r--r-- | scipy/base/src/ufuncobject.c | 4 |
5 files changed, 9 insertions, 5 deletions
diff --git a/scipy/base/code_generators/generate_ufunc_api.py b/scipy/base/code_generators/generate_ufunc_api.py index ac83b66c4..c0b50b385 100644 --- a/scipy/base/code_generators/generate_ufunc_api.py +++ b/scipy/base/code_generators/generate_ufunc_api.py @@ -92,6 +92,10 @@ ufunc_api_list = [ (r""" """, + 'On_Om', 'char **, intp *, intp *, void *', 'void'), + + (r""" + """, 'checkfperr', 'int, PyObject *', 'int'), (r""" diff --git a/scipy/base/include/scipy/ufuncobject.h b/scipy/base/include/scipy/ufuncobject.h index 5364595b5..40943f830 100644 --- a/scipy/base/include/scipy/ufuncobject.h +++ b/scipy/base/include/scipy/ufuncobject.h @@ -164,7 +164,6 @@ typedef struct { #define LOOP_END_THREADS #endif -#define PyUFunc_Unbounded 120 #define PyUFunc_One 1 #define PyUFunc_Zero 0 #define PyUFunc_None -1 diff --git a/scipy/base/numeric.py b/scipy/base/numeric.py index 2be87bf87..85472dc56 100644 --- a/scipy/base/numeric.py +++ b/scipy/base/numeric.py @@ -2,7 +2,7 @@ __all__ = ['newaxis', 'ndarray', 'bigndarray', 'flatiter', 'ufunc', 'arange', 'array', 'zeros', 'empty', 'fromstring', 'fromfile', 'frombuffer', 'where', 'concatenate', 'fastCopyAndTranspose', - 'register_dtype', 'can_cast', + 'register_dtype', 'set_numeric_ops', 'can_cast', 'asarray', 'asanyarray', 'isfortran', 'zeros_like', 'empty_like', 'correlate', 'convolve', 'inner', 'dot', 'outer', 'vdot', 'alterdot', 'restoredot', 'cross', @@ -60,6 +60,7 @@ where = multiarray.where concatenate = multiarray.concatenate fastCopyAndTranspose = multiarray._fastCopyAndTranspose register_dtype = multiarray.register_dtype +set_numeric_ops = multiarray.set_numeric_ops can_cast = multiarray.can_cast def asarray(a, dtype=None, fortran=False): diff --git a/scipy/base/src/multiarraymodule.c b/scipy/base/src/multiarraymodule.c index 7eaf5a809..5480565b6 100644 --- a/scipy/base/src/multiarraymodule.c +++ b/scipy/base/src/multiarraymodule.c @@ -3705,7 +3705,7 @@ array_set_ops_function(PyObject *self, PyObject *args, PyObject *kwds) /* Leave this to the caller for now --- error will be raised later when use is attempted */ - if (PyArray_SetNumericOps(kwds) == -1) { + if (kwds && PyArray_SetNumericOps(kwds) == -1) { Py_DECREF(oldops); PyErr_SetString(PyExc_ValueError, "one or more objects not callable"); diff --git a/scipy/base/src/ufuncobject.c b/scipy/base/src/ufuncobject.c index 99fbb10bd..de9f0fc3d 100644 --- a/scipy/base/src/ufuncobject.c +++ b/scipy/base/src/ufuncobject.c @@ -2527,7 +2527,7 @@ PyUFunc_RegisterLoopForType(PyUFuncObject *ufunc, if (ufunc->userloops == NULL) { ufunc->userloops = PyDict_New(); } - key = PyInt_FromLong(usertype); + key = PyInt_FromLong((long) usertype); if (key == NULL) return -1; cobj = PyCObject_FromVoidPtr((void *)function, NULL); if (cobj == NULL) {Py_DECREF(key); return -1;} @@ -2850,7 +2850,7 @@ static char Ufunctype__doc__[] = static PyTypeObject PyUFunc_Type = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ - "ufunc", /*tp_name*/ + "scipy.ufunc", /*tp_name*/ sizeof(PyUFuncObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ /* methods */ |