[Numpy-discussion] Please chime in on proposed methods for arrays

Fernando.Perez at colorado.edu Fernando.Perez at colorado.edu
Wed Mar 16 21:17:16 CST 2005


Quoting Robert Kern <rkern at ucsd.edu>:

> Travis Oliphant wrote:

> > Should all the ufuncs be methods as well?  I think Konrad suggested
> > this.  What is the opinion of others?
>
> I'm too lazy to search right now, but I'm pretty sure that Konrad
> suggested the opposite: that x.sin(), while possibly "cleaner" in an
> OO-fetishistic sense, jars too much against the expectation of sin(x)
> that all of us got accustomed to in math class. Maybe I should let him
> speak for himself, though.  :-)

I certainly cringe at the sight of  its_a.sin().  One of the advantages of
python is that it doesn't impose any one methodology for software development:
while an OO approach may be great for allowing arbitrary function-like objects
to be callable, for example, it doesn't mean that everything under the sun has
to become a method call.  And, though I'm as lazy as Robert (in fact, I've
proven to be lazier than him in the past), my memory also tells me that
Konrad's mathematical sensibilities lean in the direction of sin(x).

Best,

f




More information about the Numpy-discussion mailing list