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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
index 1ac1f3f03..e6ff5bf38 100644
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -284,11 +284,11 @@ def _unique1d(ar, return_index=False, return_inverse=False,
ret += (perm[mask],)
if return_inverse:
imask = np.cumsum(mask) - 1
- inv_idx = np.empty(ar.shape, dtype=np.intp)
+ inv_idx = np.empty(mask.shape, dtype=np.intp)
inv_idx[perm] = imask
ret += (inv_idx,)
if return_counts:
- idx = np.concatenate(np.nonzero(mask) + ([ar.size],))
+ idx = np.concatenate(np.nonzero(mask) + ([mask.size],))
ret += (np.diff(idx),)
return ret