[Numpy-discussion] fancy view question
Stéfan van der Walt
stefan at sun.ac.za
Tue Feb 17 09:58:57 EST 2009
2009/2/17 Gael Varoquaux <gael.varoquaux at 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)
[[1 2 3]
[4 5 6]]
[[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]]
(Code attached)
Cheers
Stéfan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zoom.py
Type: text/x-python-script
Size: 744 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090217/fdd4a0eb/attachment.bin>
More information about the NumPy-Discussion
mailing list