From 52bb92724e0bb023544a3b68a16d69bb0c76d058 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Mon, 21 Aug 2006 20:55:33 +0000 Subject: Fix shape attributes of data-types with no shape --- 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 e8a6441e2..ddbc65d21 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -10487,7 +10487,7 @@ static PyObject * arraydescr_shape_get(PyArray_Descr *self) { if (self->subarray == NULL) { - return Py_BuildValue("(N)", PyInt_FromLong(1)); + return PyTuple_New(0); } Py_INCREF(self->subarray->shape); return (PyObject *)(self->subarray->shape); -- cgit v1.2.1