[Numpy-discussion] Unifying numpy, scipy, and matplotlib docstring formats

Alexandre Fayolle alexandre.fayolle at logilab.fr
Tue Feb 27 04:50:43 EST 2007


On Sun, Feb 25, 2007 at 06:44:37PM +0200, Jouni K. Seppänen wrote:
> "Barry Wark" <barrywark at gmail.com> writes:
> 
> > Yes, I agree. I wasn't coming at so much from the goal of making Pylab
> > a Matlab clone (as you point out, that's silly, and misses much of the
> > advantage of Python), but rather from the goal of making interactive
> > use as efficient as possible. When I fire up ipython -pylab to do some
> > quick exploration, it's nice not to have to type N.blah or pylab.plot
> 
> IMHO the greatest strength of Matlab in interactive use is the matrix
> input format. For one thing, it is easier to type something like
> 
>   [0 1 0; 1 0 0; 0 0 1]
> 
> than
> 
>   array([[0,1,0],[1,0,0],[0,0,1]])


A very nice shortcut in my opinion is the one supported by the HP
scientific calculators (HP28, HP48 in my days), which would look like:

array([[0,1,0], 1, 0, 0, 0, 0, 1])

I'm not quite sure how this could be generalized nicely for arbitrary
shapes, but for arrays of rank 2 (which are a very common case where
people are actually typing the values) it feels nice (especially on a
french keyboard where the square brackets are awkward to type in) 

-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science
Reprise et maintenance de sites CPS:     http://www.migration-cms.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 481 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070227/7b55bd68/attachment.sig>


More information about the NumPy-Discussion mailing list