summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2009-02-25 16:51:29 +0000
committerCharles Harris <charlesr.harris@gmail.com>2009-02-25 16:51:29 +0000
commitb76c3e8f269322f7720814af2593363f1afd83cf (patch)
tree32d329eac7a2601886f5c0f58848b7022e81d52a
parent583ce5a245c88055bd8e969f0d4ba0c22fbb69a6 (diff)
downloadnumpy-b76c3e8f269322f7720814af2593363f1afd83cf.tar.gz
Fix coding style. Fix test_void_scalar_with_titles.
-rw-r--r--numpy/core/src/scalartypes.inc.src4
-rw-r--r--numpy/core/tests/test_regression.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/src/scalartypes.inc.src b/numpy/core/src/scalartypes.inc.src
index ee3ee73b9..b6329ce92 100644
--- a/numpy/core/src/scalartypes.inc.src
+++ b/numpy/core/src/scalartypes.inc.src
@@ -1451,7 +1451,9 @@ voidtype_getfield(PyVoidScalarObject *self, PyObject *args, PyObject *kwds)
PyObject *ret, *newargs;
newargs = PyTuple_GetSlice(args, 0, 2);
- if (newargs == NULL) return NULL;
+ if (newargs == NULL) {
+ return NULL;
+ }
ret = gentype_generic_method((PyObject *)self, newargs, kwds, "getfield");
Py_DECREF(newargs);
if (!ret) {
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 7249b7087..5ed292bfe 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -1224,7 +1224,7 @@ class TestRegression(TestCase):
"""No ticket"""
data = [('john', 4), ('mary', 5)]
dtype1 = [(('source:yy', 'name'), 'O'), (('source:xx', 'id'), int)]
- arr = array(data, dtype=dtype1)
+ arr = np.array(data, dtype=dtype1)
assert arr[0][0] == 'john'
assert arr[0][1] == 4