On Tue, Feb 17, 2009 at 10:01 AM, Gael Varoquaux <gael.varoqu...@normalesup.org> wrote: > On Tue, Feb 17, 2009 at 04:58:57PM +0200, Stéfan van der Walt wrote: >> 2009/2/17 Gael Varoquaux <gael.varoqu...@normalesup.org>: >> > That's handy, you should commit this somewhere. Actually, it would be >> > even cooler if you could have different zoom factor in different >> > direction :). > >> Something like this: > >> a = np.array([[1, 2, 3], >> [4, 5, 6]]) >> print a >> print zoom(a, x=2, y=3) > > Exactly, but with a signature that accepts a integer, or a tuple of > integers. And commiting this in eg stride_tricks. > > Gaël
I think rows and columns are in wrong sequence (axis=0, axis=1) ? >>> zoom(a, 2,3) array([[1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 3], [4, 4, 5, 5, 6, 6], [4, 4, 5, 5, 6, 6], [4, 4, 5, 5, 6, 6]]) >>> zoom(a, 3,2) array([[1, 1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 3, 3, 3], [4, 4, 4, 5, 5, 5, 6, 6, 6], [4, 4, 4, 5, 5, 5, 6, 6, 6]]) Josef _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion