Skip to content

Commit

Permalink
BUG: Check for existence of fromstr which used in `fromstr_next_ele…
Browse files Browse the repository at this point in the history
…ment` (numpygh-14174)

The check tested the wrong function. In principle a dtype could only implement one of the two slots/functions.

Fix numpy#14173.
  • Loading branch information
zjpoh authored and seberg committed Aug 2, 2019
1 parent 22fe542 commit 3d5fee2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpy/core/src/multiarray/ctors.c
Original file line number Diff line number Diff line change
Expand Up @@ -4000,7 +4000,7 @@ PyArray_FromString(char *data, npy_intp slen, PyArray_Descr *dtype,
size_t nread = 0;
char *end;

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

0 comments on commit 3d5fee2

Please sign in to comment.