diff options
author | Travis Oliphant <oliphant@enthought.com> | 2005-09-30 19:31:23 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2005-09-30 19:31:23 +0000 |
commit | a75de920c205eee7c3850247c55741410adbd1db (patch) | |
tree | 41229d0a265ec2cf9652d7b719cf2e31bc488451 /scipy/base/src/arrayobject.c | |
parent | fe01351b12c5156a4f36fd20a7798545a33633cd (diff) | |
download | numpy-a75de920c205eee7c3850247c55741410adbd1db.tar.gz |
Fixed some casting rule issues.
Diffstat (limited to 'scipy/base/src/arrayobject.c')
-rw-r--r-- | scipy/base/src/arrayobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scipy/base/src/arrayobject.c b/scipy/base/src/arrayobject.c index f174977c5..9e036a721 100644 --- a/scipy/base/src/arrayobject.c +++ b/scipy/base/src/arrayobject.c @@ -5466,7 +5466,7 @@ PyArray_CanCastSafely(int fromtype, int totype) else if (PyTypeNum_ISCOMPLEX(totype)) { return ((to->elsize >> 1) > from->elsize); } - else return 0; + else return totype > fromtype; case PyArray_UBYTE: case PyArray_USHORT: case PyArray_UINT: @@ -5486,7 +5486,7 @@ PyArray_CanCastSafely(int fromtype, int totype) else if (PyTypeNum_ISCOMPLEX(totype)) { return ((to->elsize >> 1) > from->elsize); } - else return 0; + else return totype > fromtype; case PyArray_FLOAT: case PyArray_DOUBLE: case PyArray_LONGDOUBLE: |