diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-06-29 11:37:37 -0400 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-07-26 09:54:48 -0400 |
commit | 1e1f08bd317657d63ede46de260f98ac0adf9b92 (patch) | |
tree | eb98ef30e5a5d0e1aa8b045b178be9814d309a92 /numpy | |
parent | 210f07f2e91727f7f2f687beb36e7d53445d1e72 (diff) | |
download | numpy-1e1f08bd317657d63ede46de260f98ac0adf9b92.tar.gz |
BUG: is_complex should explicitly change an array scalar to scalar.
Rather than rely on +array doing that for it.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/lib/type_check.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py index 1664e6ebb..3f7aa32fa 100644 --- a/numpy/lib/type_check.py +++ b/numpy/lib/type_check.py @@ -215,7 +215,7 @@ def iscomplex(x): if issubclass(ax.dtype.type, _nx.complexfloating): return ax.imag != 0 res = zeros(ax.shape, bool) - return +res # convert to array-scalar if needed + return res[()] # convert to scalar if needed def isreal(x): """ |