diff options
author | Travis Oliphant <oliphant@enthought.com> | 2008-05-07 20:24:34 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2008-05-07 20:24:34 +0000 |
commit | c32a389417cd22a7fca720f2b1505acbe8560b3d (patch) | |
tree | 57ec5166c87bfdb9f4dc4567daf530c2682f842b /numpy/core/defmatrix.py | |
parent | 7c99e67bb87381a4622cde5e2d244a5f64882485 (diff) | |
download | numpy-c32a389417cd22a7fca720f2b1505acbe8560b3d.tar.gz |
* Make matrices return 1-dimensional array on item selection for 1.2\n * Remove (now un-needed) tolist method from matrices\n * For ticket #551, copy data if start of memory is not aligned on itemsize location in optimized blas wrapper.
Diffstat (limited to 'numpy/core/defmatrix.py')
-rw-r--r-- | numpy/core/defmatrix.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/numpy/core/defmatrix.py b/numpy/core/defmatrix.py index ca7240757..c74100dda 100644 --- a/numpy/core/defmatrix.py +++ b/numpy/core/defmatrix.py @@ -223,6 +223,8 @@ class matrix(N.ndarray): return def __getitem__(self, index): + if isscalar(index): + return self.__array__()[index] self._getitem = True try: @@ -472,11 +474,6 @@ class matrix(N.ndarray): def ptp(self, axis=None, out=None): return N.ndarray.ptp(self, axis, out)._align(axis) - # Needed becase tolist method expects a[i] - # to have dimension a.ndim-1 - def tolist(self): - return self.__array__().tolist() - def getI(self): M,N = self.shape if M == N: |