Hi Please keep your replies on list. It's important that this thread in particular is publicly archived, since it may serve as the reference for further discussions.
On Wed, Oct 22, 2008 at 3:37 PM, Sebastien Binet <[EMAIL PROTECTED]> wrote: > Fernando, > >> much delayed, but here it is, finally. The doc regarding our >> discussion about PEP 225 is attached, and I'm keeping a public copy >> for viewing convenience (with html) here: >> >> https://cirl.berkeley.edu/fperez/static/numpy-pep225/ >> >> Note that, as indicated in the link above, the real doc is in bzr, so >> you can check it out to generate patches or a branch (the preferred >> formats for big changes). >> >> This is just a first cut, going from memory and notes. I'd appreciate >> any feedback, corrections, etc. > > what about the D-language-like syntax I proposed which has the advantage of > not > introducing gazillions of new operators (but just stating that the operation > will be broadcasted/vectorized) ? > > # create array of doubles > a = ... > # add 42 to all elements > a[] += 42. > # apply a function > b = sin(a[]) > # or this? > b = sin[](a) > > c = a[] + b[] Regardless of its merits in D, I'd bet this has little chance of flying in python. The pep is simply about adding some special methods with matching operator form, inline with existing python syntactic tradition. This suggestion is a pretty radical departure from Python's existing style. Having said that, I'm not Guido and I could be 100% wrong here, so I'll most certainly put your comments in when I update the document later. >> I'm giving a talk at the BayPiggies >> group Nov 13 about SciPy > count me in ;) > > cheers, > sebastien. > -- > ################################### > # Dr. Sebastien Binet > # Lawrence Berkeley National Lab. > # 1 Cyclotron Road > # Berkeley, CA 94720 > ################################### > > Cheers, f _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion