[Numpy-discussion] missing array type
Alan G Isaac
aisaac at american.edu
Mon Feb 27 15:43:02 CST 2006
On Mon, 27 Feb 2006, Sasha apparently wrote:
> If you agree that zero-stride array would provide the
> functionality that you need, it may tip the ballance
> towards accepting that patch.
I am out of my technical depth here. Based on your
examples, zero-stride arrays seem both logical and
desirable. They do seem just right for a simpler (and
substantially generalized) nd_grid. But I think they only
partially address problems two other that have come up.
1. repmat
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/repmat.html#998661
Perhaps you will say that the best representation of
a repmat will use 4 dimensions, two with zero strides?
I wonder if a more general cycling is needed for a natural
repeated matrix.
2. Kronecker product:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/kron.html#998881
This seems a different issue altogether. I suspect the
right way to produce kron(x,y) is usually as a class
whose data is x and y, with the Kronecker product never
actually stored in memory. I do not see zero-stride
arrays as helping here.
Cheers,
Alan Isaac
More information about the Numpy-discussion
mailing list