diff options
Diffstat (limited to 'numpy/core/src')
-rw-r--r-- | numpy/core/src/arrayobject.c | 2 | ||||
-rw-r--r-- | numpy/core/src/scalarmathmodule.c.src | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 58c7f84c6..759394744 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -709,7 +709,7 @@ index2ptr(PyArrayObject *mp, intp i) if (i==0 && dim0 > 0) return mp->data; - if (mp->nd>0 && i>0 && i < dim0) { + if (i>0 && i < dim0) { return mp->data+i*mp->strides[0]; } PyErr_SetString(PyExc_IndexError,"index out of bounds"); diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src index 1ef548169..edd85d004 100644 --- a/numpy/core/src/scalarmathmodule.c.src +++ b/numpy/core/src/scalarmathmodule.c.src @@ -546,7 +546,7 @@ static PyObject * #if @fperr@ int retstatus; #endif - + switch(_@name@_convert2_to_ctypes(a, &arg1, b, &arg2)) { case 0: break; @@ -584,6 +584,7 @@ static PyObject * } #endif + #if @twoout@ ret = PyTuple_New(2); if (ret==NULL) return NULL; @@ -1095,8 +1096,8 @@ PyMODINIT_FUNC initscalarmath(void) { m = Py_InitModule("scalarmath", methods); - import_array(); return; - import_umath(); return; + import_array(); + import_umath(); if (get_functions() < 0) return; |