diff options
author | Travis Oliphant <oliphant@enthought.com> | 2007-05-17 11:55:11 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2007-05-17 11:55:11 +0000 |
commit | 4eb3bf56a0d3de3fb67fe6d3fcbd55e798ea4fca (patch) | |
tree | c4d260d99374417593a3d39e26fd456b580d48d4 /numpy/core/src/arrayobject.c | |
parent | 50894958e9a8f515ed85c27127cd91a784eb8308 (diff) | |
download | numpy-4eb3bf56a0d3de3fb67fe6d3fcbd55e798ea4fca.tar.gz |
Fix ticekt #511 and start to handle allclose problems.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 200100323..b5b39caad 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -6918,10 +6918,18 @@ _array_small_type(PyArray_Descr *chktype, PyArray_Descr* mintype) return mintype; } + if (chktype->type_num > mintype->type_num) outtype_num = chktype->type_num; - else - outtype_num = mintype->type_num; + else { + if (PyDataType_ISOBJECT(chktype) && \ + PyDataType_ISSTRING(mintype)) { + return PyArray_DescrFromType(NPY_OBJECT); + } + else { + outtype_num = mintype->type_num; + } + } save_num = outtype_num; while(outtype_num < PyArray_NTYPES && |