From 2be00c3fe6f6d84d4449b1cb26452642b48c0661 Mon Sep 17 00:00:00 2001 From: mlai Date: Sat, 11 Jul 2015 12:05:14 -0500 Subject: BUG: made view of new array to fix ix_ bug closes gh-6062 done with help of Sebastian Berg! =) --- 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 cece8ac8d..c68bf2634 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -80,7 +80,7 @@ def ix_(*args): new = new.astype(_nx.intp) if issubdtype(new.dtype, _nx.bool_): new, = new.nonzero() - new.shape = (1,)*k + (new.size,) + (1,)*(nd-k-1) + new = new.reshape((1,)*k + (new.size,) + (1,)*(nd-k-1)) out.append(new) return tuple(out) -- cgit v1.2.1