[IPython-User] Calling 'Image' several times in the same cell
Ariel Rokem
arokem@gmail....
Tue Nov 13 16:09:47 CST 2012
Hi Fernando and Matthias,
On Tue, Nov 13, 2012 at 1:29 PM, Fernando Perez <fperez.net@gmail.com>wrote:
> On Tue, Nov 13, 2012 at 3:18 PM, Ariel Rokem <arokem@gmail.com> wrote:
> >
> > Any ideas? Thanks in advance!
>
> You should call display(Image(....)).
>
> display() is the IPython equivalent of 'print' for the notebook. By
> default, we only call display on the *last* block of a cell, and not
> in a loop. So just like
>
> for i in range(10):
> i
>
> wouldn't print you the numbers and instead you'd write
>
> for i in range(10):
> print i
>
> then you should do:
>
> for i in images:
> display(Image(i))
>
> Cheers,
>
>
Thanks to both of you for the answers. It all makes sense and works great!
Cheers,
Ariel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121113/a63f9db7/attachment.html
More information about the IPython-User
mailing list