[Numpy-discussion] untenable matrix behavior in SVN
Charles R Harris
Tue Apr 29 01:39:29 CDT 2008
On Tue, Apr 29, 2008 at 12:20 AM, Alan G Isaac <firstname.lastname@example.org> wrote:
> On Mon, 28 Apr 2008, Christopher Barker apparently wrote:
> > I'm going to try to put down what I think are the key,
> > very simple, questions:
> For useful reference, these are now here:
May I add that if I edit defmatrix.py to act like an array for scalar
indexing, then the following works.
In : a = matrix(eye(2))
In : array([a,a])
array([[[ 1., 0.],
[ 0., 1.]],
[[ 1., 0.],
[ 0., 1.]]])
This generates an error with the current version of matrix and, frankly, I
am not going to be bothered going all through the numpy c sources to special
case matrices to fix that. Someone else can do it if they wish. There are
recursive routines that expect the dimensions to decrease on each call.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion