summaryrefslogtreecommitdiff
path: root/numpy/lib/arraysetops.py
diff options
context:
space:
mode:
authorJaime <jaime.frio@gmail.com>2014-09-23 08:50:00 -0700
committerJaime <jaime.frio@gmail.com>2014-09-23 08:50:00 -0700
commitfc5d32af378dcb86ec05fd0a2b63c5bdaef37cc8 (patch)
tree71f00c59b0c3c0876a875dc87900470c9035cecc /numpy/lib/arraysetops.py
parent2e3778a189afafce5b0d3c62b93075e253cfba0f (diff)
parent7efd5cf4cc6cd45f6114fdbc3fbfd619ddf03deb (diff)
downloadnumpy-fc5d32af378dcb86ec05fd0a2b63c5bdaef37cc8.tar.gz
Merge pull request #5099 from perimosocordiae/patch-1
BUG: np.unique with chararray + inverse_index
Diffstat (limited to 'numpy/lib/arraysetops.py')
-rw-r--r--numpy/lib/arraysetops.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
index bc80d0ecd..5c3b504de 100644
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -204,7 +204,7 @@ def unique(ar, return_index=False, return_inverse=False, return_counts=False):
ret += (perm[flag],)
if return_inverse:
iflag = np.cumsum(flag) - 1
- inv_idx = np.empty_like(ar, dtype=np.intp)
+ inv_idx = np.empty(ar.shape, dtype=np.intp)
inv_idx[perm] = iflag
ret += (inv_idx,)
if return_counts: