diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-06 12:57:33 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-06 12:57:33 +0000 |
commit | aa17d93cc0f4beae1973646131a1caba5536b336 (patch) | |
tree | c27c9881e5f3e18d87b0a2808ce9d8144dd91b7d /numpy/core/src | |
parent | c1b2fc12263b652898d4e7d539aabaf31176629c (diff) | |
download | numpy-aa17d93cc0f4beae1973646131a1caba5536b336.tar.gz |
Get rid of silly returns in scalar-math module which was preventing it's working.
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; |