On 7 Oct 2013, at 21:16, numpy-discussion-requ...@scipy.org wrote: > > > Message: 5 > Date: Mon, 7 Oct 2013 13:38:53 -0500 > From: Aronne Merrelli <aronne.merre...@gmail.com> > Subject: Re: [Numpy-discussion] Equivalent to IDL's help function > > > 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. > > Here are some examples - you can see this works quite well but it will > become unwieldy if your interactive namespace becomes large: > > In [1]: x = 1; y = 2; z = 3.3; d = {'one':1, 'two':2, 'three':3} > > In [2]: whos > Variable Type Data/Info > ----------------------------- > d dict n=3 > x int 1 > y int 2 > z float 3.3 > > In [3]: whos dict > Variable Type Data/Info > ---------------------------- > d dict n=3 > > In [4]: xa = np.arange(111); ya = np.ones((22,4)) > > In [5]: whos ndarray > Variable Type Data/Info > ------------------------------- > xa ndarray 111: 111 elems, type `int64`, 888 bytes > ya ndarray 22x4: 88 elems, type `float64`, 704 bytes > >
Hi [I hope I am not screwing up the digest reply function here]. I am after a "whos" which would work in a script. It is not very often that I develop code at the command line. I am definitely not one of the best programmers out there but I used "help" a lot in my IDL scripts and code. Our research group is migrating away from IDL towards Python. I think Python's help is not the same than IDL's help. I know copying things from other languages is not always a good idea but one cannot argue that IDL's help comes in rather handy while developing and testing code. > > > On Mon, Oct 7, 2013 at 12:15 PM, Siegfried Gonzi > <sgo...@staffmail.ed.ac.uk>wrote: > >> Hi all >> >> What is the equivalent to IDL its help function, e.g. >> >> == >> IDL> a = make_array(23,23,) >> >> IDL> help,a >> >> will result in: >> >> A FLOAT = Array[23, 23] >> >> or >> >> IDL> a = create_struct('idl',23) >> >> IDL> help,a >> >> gives: >> >> A STRUCT = -> <Anonymous> Array[1] >> >> == >> >> I have been looking for it ever since using numpy. It would make my life >> so much easier. >> >> >> Thanks, Siegfried >> >> >> -- >> The University of Edinburgh is a charitable body, registered in >> Scotland, with registration number SC005336. >> >> _______________________________________________ >> NumPy-Discussion mailing list >> NumPy-Discussion@scipy.org >> http://mail.scipy.org/mailman/listinfo/numpy-discussion >> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://mail.scipy.org/pipermail/numpy-discussion/attachments/20131007/cccb9996/attachment-0001.html > > > ------------------------------ > > Message: 6 > Date: Mon, 07 Oct 2013 23:22:17 +0300 > From: Dmitrey <tm...@ukr.net> > Subject: Re: [Numpy-discussion] [ANN] MATLAB ODE solvers - now > available in Python (Dmitrey) > To: Discussion of Numerical Python <numpy-discussion@scipy.org> > Cc: numpy-discussion@scipy.org > Message-ID: <1381177204.440489225.k74gn...@frv43.ukr.net> > Content-Type: text/plain; charset="utf-8" > > FYI scipy ODE solvers vode, dopri5, dop853 also have been connected to > OpenOpt, possibly with automatic differentiation by FuncDesigner? (dopri5 and > dop853 don't use derivatives although). > > ---------------------- > Regards, D. http://openopt.org/Dmitrey > > --- ???????? ????????? --- > ?? ????: "David Goldsmith" < d.l.goldsm...@gmail.com > > ????: 7 ??????? 2013, 07:16:33 > > On Sun, Oct 6, 2013 at 10:00 AM, < numpy-discussion-requ...@scipy.org > > wrote: > Message: 2 > Date: Sat, 05 Oct 2013 21:36:48 +0300 > From: Dmitrey < tm...@ukr.net > > Subject: Re: [Numpy-discussion] [ANN] MATLAB ODE solvers - now > ? ? ? ? available in ? ?Python > To: Discussion of Numerical Python < numpy-discussion@scipy.org > > Cc: numpy-discussion@scipy.org > Message-ID: < 1380997576.559804301.aoyna...@frv43.ukr.net > > Content-Type: text/plain; charset="utf-8" > ? Seems like using the MATLAB solvers with MCR requires my wrappers > containing in several files to be compiled with MATLAB Compiler before. I > have no license for MATLAB thus I may have problems if I'll make it done and > will spread it with OpenOpt suite code, also, binary files are incompatible > with BSD license. > > Darn, knew it was too good to be true. ? On the other hand, IIRC a little bit > obsolete MATLAB versions (I don't think difference is essential) have more > liberal licenses. > As for MATLAB solvers examples, I have already mentioned them in the mail > list, you could see them in http://openopt.org/ODE (just replace solver name > from scipy_lsoda to ode23s or any other), http://openopt.org/NLP , > http://openopt.org/SNLE > Oooops, so sorry. :-o? > DG? > ---------------------- > Regards, D. http://openopt.org/Dmitrey > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://mail.scipy.org/pipermail/numpy-discussion/attachments/20131005/dd6638db/attachment-0001.html > > > ------------------------------ > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > > > End of NumPy-Discussion Digest, Vol 85, Issue 17 > ************************************************ > > > > -- >> From "A Letter From The Future" in "Peak Everything" by Richard Heinberg: > > "By the time I was an older teenager, a certain...attitude was developing > among the young people...a feeling of utter contempt for anyone over a > certain age--maybe 30 or 40.? The adults had consumed so many resources, and > now there were none left for their own children...when those adults were > younger, they [were] just doing what everybody else was doing...they figured > it was normal to cut down ancient forests for...phone books, pump every last > gallon of oil to power their SUV's...[but] for...my generation all that was > just a dim memory...We [grew up] living in darkness, with shortages of food > and water, with riots in the streets, with people begging on street > corners...for us, the adults were the enemy." > > Want to really understand what's really going on?? Read "Peak Everything." > > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://mail.scipy.org/pipermail/numpy-discussion/attachments/20131007/20a4c824/attachment.html > > > ------------------------------ > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > > > End of NumPy-Discussion Digest, Vol 85, Issue 19 > ************************************************ >
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion