Skip to content

Commit 3d5fee2

Browse files
zjpohseberg
authored andcommitted
BUG: Check for existence of fromstr which used in fromstr_next_element (numpygh-14174)
The check tested the wrong function. In principle a dtype could only implement one of the two slots/functions. Fix numpy#14173.
1 parent 22fe542 commit 3d5fee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/core/src/multiarray/ctors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4000,7 +4000,7 @@ PyArray_FromString(char *data, npy_intp slen, PyArray_Descr *dtype,
40004000
size_t nread = 0;
40014001
char *end;
40024002

4003-
if (dtype->f->scanfunc == NULL) {
4003+
if (dtype->f->fromstr == NULL) {
40044004
PyErr_SetString(PyExc_ValueError,
40054005
"don't know how to read " \
40064006
"character strings with that " \

0 commit comments

Comments
 (0)