From f89443c39616bd4ad13cb9152c28acc15c6500be Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Thu, 29 Mar 2007 19:21:58 +0000 Subject: Fix ticket #485 by improving how a dtype variable reports its length. --- numpy/core/src/arrayobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/src/arrayobject.c') diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 8ec1e6b47..6439efad8 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -11438,7 +11438,7 @@ descr_length(PyObject *self0) PyArray_Descr *self = (PyArray_Descr *)self0; if (self->names) - return PyDict_Size(self->fields); + return PyTuple_GET_SIZE(self->names); else return 0; } -- cgit v1.2.1