From e52efca5accf06016ca4c1b180216e66db881ce2 Mon Sep 17 00:00:00 2001 From: Konrad Kapp Date: Sat, 20 May 2017 12:50:15 +0200 Subject: BUG: set default type for empty index array to `numpy.intp` (#9142) Fixes #9137 --- numpy/lib/arraysetops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/lib/arraysetops.py') diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index d29e555b8..9b0a1193f 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -263,9 +263,9 @@ def _unique1d(ar, return_index=False, return_inverse=False, else: ret = (ar,) if return_index: - ret += (np.empty(0, np.bool),) + ret += (np.empty(0, np.intp),) if return_inverse: - ret += (np.empty(0, np.bool),) + ret += (np.empty(0, np.intp),) if return_counts: ret += (np.empty(0, np.intp),) return ret -- cgit v1.2.1