From bf6e7a7edb1c5173f1a3eb343fbd9e7b25445073 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Fri, 25 Apr 2008 17:31:19 +0000 Subject: Revert x[0][0] hack. --- numpy/core/defmatrix.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'numpy/core/defmatrix.py') diff --git a/numpy/core/defmatrix.py b/numpy/core/defmatrix.py index 77e90acbd..ca7240757 100644 --- a/numpy/core/defmatrix.py +++ b/numpy/core/defmatrix.py @@ -225,13 +225,6 @@ class matrix(N.ndarray): def __getitem__(self, index): self._getitem = True - # If indexing by scalar, check whether we are indexing into - # a vector, and then return the corresponding element - if N.isscalar(index) and (1 in self.shape): - index = [index,index] - index[list(self.shape).index(1)] = 0 - index = tuple(index) - try: out = N.ndarray.__getitem__(self, index) finally: -- cgit v1.2.1