summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorZijie (ZJ) Poh <8103276+zjpoh@users.noreply.github.com>2019-08-02 13:37:50 -0700
committerSebastian Berg <sebastian@sipsolutions.net>2019-08-02 13:37:50 -0700
commit3d5fee2f9077a42677c724c36e78be5849c17c81 (patch)
treec2be22a4582c152d6deaa87da478c7a87c3d56b6 /numpy/core
parent22fe5427be1f3a0b186d01a09ff46092a42a0aa1 (diff)
downloadnumpy-3d5fee2f9077a42677c724c36e78be5849c17c81.tar.gz
BUG: Check for existence of `fromstr` which used in `fromstr_next_element` (gh-14174)
The check tested the wrong function. In principle a dtype could only implement one of the two slots/functions. Fix #14173.
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/src/multiarray/ctors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index 53efb1cea..663d58e6b 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -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 " \