From 90372cf755f3f9f90d021d3db2d774de4e6a6161 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Mon, 23 Oct 2006 16:30:18 +0000 Subject: In ix_, do not modify shape of input array. --- numpy/lib/index_tricks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/index_tricks.py') diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index aefa21f53..02f78bec5 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -78,7 +78,7 @@ def ix_(*args): if issubclass(new.dtype.type, _nx.bool_): new = new.nonzero()[0] baseshape[k] = len(new) - new.shape = tuple(baseshape) + new = new.reshape(tuple(baseshape)) out.append(new) baseshape[k] = 1 return tuple(out) -- cgit v1.2.1