diff options
author | Anas Khan <anasalimkhan@gmail.com> | 2018-01-08 11:57:10 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-08 11:57:10 +0530 |
commit | 45df7011edaeb263a231003c1efcb5ebb902a349 (patch) | |
tree | 6b3e00f781e16adea35e52e7ab25a98ccfc8869f /numpy/lib/arraysetops.py | |
parent | 63462697992fd8ebd608ba617c811d9b3d703a91 (diff) | |
download | numpy-45df7011edaeb263a231003c1efcb5ebb902a349.tar.gz |
BUG: fixing flattening of arrays in `union1d` in arraysetops.py
Diffstat (limited to 'numpy/lib/arraysetops.py')
-rw-r--r-- | numpy/lib/arraysetops.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index a9426cdf3..e00163941 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -614,7 +614,7 @@ def union1d(ar1, ar2): >>> reduce(np.union1d, ([1, 3, 4, 3], [3, 1, 2, 1], [6, 3, 4, 2])) array([1, 2, 3, 4, 6]) """ - return unique(np.concatenate((ar1, ar2))) + return unique(np.concatenate((ar1.flatten(), ar2.flatten()))) def setdiff1d(ar1, ar2, assume_unique=False): """ |