summaryrefslogtreecommitdiff
path: root/numpy/core/src/arrayobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-03-03 16:45:16 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-03-03 16:45:16 +0000
commit07a9750e934ad45f086b73b9f9f114ea4b2fcdd1 (patch)
tree08cf702655d15eb3e0d1df765de109b2ac669c9b /numpy/core/src/arrayobject.c
parent7db985eaaac53558b3b2af322375f237ca4fe457 (diff)
downloadnumpy-07a9750e934ad45f086b73b9f9f114ea4b2fcdd1.tar.gz
Fix an issue with string/unicode arrays created from scalars.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r--numpy/core/src/arrayobject.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c
index b004ca6a4..739dc69c7 100644
--- a/numpy/core/src/arrayobject.c
+++ b/numpy/core/src/arrayobject.c
@@ -5431,10 +5431,8 @@ Array_FromScalar(PyObject *op, PyArray_Descr *typecode)
if (type == PyArray_UNICODE) itemsize *= 4;
}
- ret = (PyArrayObject *)PyArray_NewFromDescr(&PyArray_Type, typecode,
- 0, NULL,
- NULL, NULL, 0, NULL);
-
+ ret = (PyArrayObject *)PyArray_New(&PyArray_Type, 0, NULL, type,
+ NULL, NULL, itemsize, 0, NULL);
if (ret == NULL) return NULL;
if (ret->nd > 0) {
PyErr_SetString(PyExc_ValueError,