diff options
author | Travis Oliphant <oliphant@enthought.com> | 2007-05-17 10:37:08 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2007-05-17 10:37:08 +0000 |
commit | 50894958e9a8f515ed85c27127cd91a784eb8308 (patch) | |
tree | 57f89b87c486b367909c5dd069c8e9e3b5a4b0b5 /numpy/lib | |
parent | 5b4e40b73703617f8d24c6b4162f6777eaa176a1 (diff) | |
download | numpy-50894958e9a8f515ed85c27127cd91a784eb8308.tar.gz |
Fix some bugs with isposinf and isneginf as well as with how allclose dealt with infinities. See ticket #519
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/ufunclike.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/lib/ufunclike.py b/numpy/lib/ufunclike.py index cf014e77d..a8c2c1e25 100644 --- a/numpy/lib/ufunclike.py +++ b/numpy/lib/ufunclike.py @@ -29,6 +29,7 @@ def isposinf(x, y=None): If y is an array, the result replaces the contents of y. """ if y is None: + x = asarray(x) y = empty(x.shape, dtype=nx.bool_) umath.logical_and(isinf(x), ~signbit(x), y) return y @@ -39,6 +40,7 @@ def isneginf(x, y=None): If y is an array, the result replaces the contents of y. """ if y is None: + x = asarray(x) y = empty(x.shape, dtype=nx.bool_) umath.logical_and(isinf(x), signbit(x), y) return y |