From 48ef07dc880e384409024c81e7da67cc47c90d9e Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Wed, 19 Jul 2006 03:33:22 +0000 Subject: Fix a couple of issues with object matrices --- numpy/core/defmatrix.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'numpy/core/defmatrix.py') diff --git a/numpy/core/defmatrix.py b/numpy/core/defmatrix.py index bfcb68364..441500c90 100644 --- a/numpy/core/defmatrix.py +++ b/numpy/core/defmatrix.py @@ -122,6 +122,8 @@ class matrix(N.ndarray): def __getitem__(self, index): out = N.ndarray.__getitem__(self, index) + if not isinstance(out, matrix): + return out # Need to swap if slice is on first index # or there is an integer on the second retscal = False -- cgit v1.2.1