<div dir="ltr"><div>There isn't anything quite the same. (I think what you are really asking for is a way to print the essential info about one variable name, at least that is how I would use the IDL "help" procedure). In IPython, I use the whos magic to do something similar, although it just prints this info for all variables or all variables of one class, rather than just one variable. I do not think there is a way to do it for just one variable.<br>
<br>Here are some examples - you can see this works quite well but it will become unwieldy if your interactive namespace becomes large:<br><br>In [1]: x = 1; y = 2; z = 3.3; d = {'one':1, 'two':2, 'three':3}<br>
<br>In [2]: whos<br>Variable   Type     Data/Info<br>-----------------------------<br>d          dict     n=3<br>x          int      1<br>y          int      2<br>z          float    3.3<br><br>In [3]: whos dict<br>Variable   Type    Data/Info<br>
----------------------------<br>d          dict    n=3<br><br>In [4]: xa = np.arange(111); ya = np.ones((22,4))<br><br>In [5]: whos ndarray<br>Variable   Type       Data/Info<br>-------------------------------<br>xa         ndarray    111: 111 elems, type `int64`, 888 bytes<br>
ya         ndarray    22x4: 88 elems, type `float64`, 704 bytes<br><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 12:15 PM, Siegfried Gonzi <span dir="ltr"><<a href="mailto:sgonzi@staffmail.ed.ac.uk" target="_blank">sgonzi@staffmail.ed.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all<br>
<br>
What is the equivalent to IDL its help function, e.g.<br>
<br>
==<br>
IDL> a = make_array(23,23,)<br>
<br>
IDL> help,a<br>
<br>
will result in:<br>
<br>
A               FLOAT     = Array[23, 23]<br>
<br>
or<br>
<br>
IDL> a = create_struct('idl',23)<br>
<br>
IDL> help,a<br>
<br>
gives:<br>
<br>
A               STRUCT    = -> <Anonymous> Array[1]<br>
<br>
==<br>
<br>
I have been looking for it ever since using numpy. It would make my life so much easier.<br>
<br>
<br>
Thanks, Siegfried<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
The University of Edinburgh is a charitable body, registered in<br>
Scotland, with registration number SC005336.<br>
<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</font></span></blockquote></div><br></div>