8000 BUG: allow npy_PyFile_Dup2 to report its error in np.fromfile · numpy/numpy@5225e4c · GitHub
[go: up one dir, main page]

Skip to content

Commit 5225e4c

Browse files
committed
BUG: allow npy_PyFile_Dup2 to report its error in np.fromfile
1 parent 99583aa commit 5225e4c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

numpy/core/src/multiarray/multiarraymodule.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,8 +2119,6 @@ array_fromfile(PyObject *NPY_UNUSED(ignored), PyObject *args, PyObject *keywds)
21192119
}
21202120
fp = npy_PyFile_Dup2(file, "rb", &orig_pos);
21212121
if (fp == NULL) {
2122-
PyErr_SetString(PyExc_IOError,
2123-
"first argument must be an open file");
21242122
Py_DECREF(file);
21252123
return NULL;
21262124
}

0 commit comments

Comments
 (0)
0