[IPython-User] Calling 'Image' several times in the same cell

Fernando Perez fperez.net@gmail....
Tue Nov 13 15:29:04 CST 2012


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,

f


More information about the IPython-User mailing list