[SciPy-dev] draft: NumPy User Guide introduction
Alan G Isaac
aisaac at american.edu
Tue Aug 25 08:49:16 EDT 2009
On 8/25/2009 4:56 AM Dag Sverre Seljebotn apparently wrote:
> why exactly is it that
>
> arr.mean()
>
> is OK, while arr.sin(), arr.cos() or arr.dot(otherarr) is not?
>
> (It seems the rule is "array -> scalar" mappings are OK as method,
> others are not, but that seems arbitrary to me.)
I do not know the original justification,
but conceptually, the mean is a property
of the data in the array.
As a user, I'd actually like to see
`dot` implemented as a method so we
could do a1.dot(a2). This would make
a lot of code cleaner to read.
Alan Isaac
More information about the SciPy-Dev
mailing list