[IPython-user] NumPy display problem

Fernando Perez Fernando.Perez at colorado.edu
Tue Jan 24 19:54:16 CST 2006


Ryan Krauss wrote:
> I just accidentally requested a 21000 element NumPy array be printed
> to the ipython terminal (by just typing the variable name at the
> interactive prompt).  It seems like this used to be handled gracefully
> by printing the first 100 or so elements and then a mesage about there
> being more elments.  But this isn't happening for me, instead it hangs
> for a few seconds and then prints the entire array.

Before, you were probably using Numeric, and had pylab loaded.  pylab loads 
MA, the old Masked Array module, which had a side-effect of modifying the 
array printout routines to suppress large arrays.

I'm not sure where the equivalent functionality is in numpy, but I hope it's 
been changed from being a silent side effect of an obscure module import to 
something a little more explicit.

Cheers,

f




More information about the IPython-user mailing list