summaryrefslogtreecommitdiff
path: root/numpy/lib/arraysetops.py
diff options
context:
space:
mode:
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: