8000 Fix ndindex issue · seberg/numpy@fda92e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit fda92e2

Browse files
committed
Fix ndindex issue
Call to ndindex() with no arguments results in a ValueError exception, whereas before commit ca27396, a call with no arguments was allowed. Issue is due to unneeded check for shape tuple size.
1 parent 849a8c5 commit fda92e2

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

numpy/core/src/multiarray/ctors.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,11 +2075,6 @@ PyArray_FromInterface(PyObject *origin)
20752075
/* Case for data access through pointer */
20762076
if (attr && PyTuple_Check(attr)) {
20772077
PyObject *dataptr;
2078-
if (n == 0) {
2079-
PyErr_SetString(PyExc_ValueError,
2080-
"__array_interface__ shape must be at least size 1");
2081-
goto fail;
2082-
}
20832078
if (PyTuple_GET_SIZE(attr) != 2) {
20842079
PyErr_SetString(PyExc_TypeError,
20852080
"__array_interface__ data must be a 2-tuple with "

0 commit comments

Comments
 (0)
0