Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-24 Thread Bob Dowling
There is not supposed to be a one-to-one correspondence between the functions in numpy and the methods on an ndarray. There is some duplication between the two, but that is not a reason to make more duplication. I would make a plea for consistency, to start with. Those of us who write in an

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-24 Thread Sebastian Haase
On Tue, Jun 24, 2008 at 3:11 AM, Robert Kern [EMAIL PROTECTED] wrote: On Mon, Jun 23, 2008 at 19:35, Ryan May [EMAIL PROTECTED] wrote: Robert Kern wrote: On Mon, Jun 23, 2008 at 18:10, Sebastian Haase [EMAIL PROTECTED] wrote: On Mon, Jun 23, 2008 at 10:31 AM, Bob Dowling [EMAIL PROTECTED]

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-24 Thread Anne Archibald
2008/6/24 Bob Dowling [EMAIL PROTECTED]: There is not supposed to be a one-to-one correspondence between the functions in numpy and the methods on an ndarray. There is some duplication between the two, but that is not a reason to make more duplication. I would make a plea for consistency, to

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-24 Thread David Cournapeau
Sebastian Haase wrote: Are you saying the duplication is just random ? It would be better -- as in: principle of minimum surprise -- if there would be some sort reasonable set of duplicates Yes it would be better. But how do you do it without breaking other people code and avoiding

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-24 Thread Stéfan van der Walt
Hi Bob 2008/6/24 Bob Dowling [EMAIL PROTECTED]: I would make a plea for consistency, to start with. Those of us who write in an OO style are required to switch backwards and forwards between OO and not-OO, or to abandon OO altogether in our NumPy code. Neither is an attractive option.

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-24 Thread Robert Kern
On Tue, Jun 24, 2008 at 02:33, Bob Dowling [EMAIL PROTECTED] wrote: There is not supposed to be a one-to-one correspondence between the functions in numpy and the methods on an ndarray. There is some duplication between the two, but that is not a reason to make more duplication. I would make

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-24 Thread Robert Kern
On Tue, Jun 24, 2008 at 02:43, Sebastian Haase [EMAIL PROTECTED] wrote: On Tue, Jun 24, 2008 at 3:11 AM, Robert Kern [EMAIL PROTECTED] wrote: On Mon, Jun 23, 2008 at 19:35, Ryan May [EMAIL PROTECTED] wrote: Robert Kern wrote: On Mon, Jun 23, 2008 at 18:10, Sebastian Haase [EMAIL PROTECTED]

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-24 Thread Sebastian Haase
On Tue, Jun 24, 2008 at 7:40 PM, Robert Kern [EMAIL PROTECTED] wrote: On Tue, Jun 24, 2008 at 02:43, Sebastian Haase [EMAIL PROTECTED] wrote: On Tue, Jun 24, 2008 at 3:11 AM, Robert Kern [EMAIL PROTECTED] wrote: On Mon, Jun 23, 2008 at 19:35, Ryan May [EMAIL PROTECTED] wrote: Robert Kern

[Numpy-discussion] ndarray methods vs numpy module functions

2008-06-23 Thread Bob Dowling
[ I'm new here and this has the feel of an FAQ but I couldn't find anything at http://www.scipy.org/FAQ . If I should have looked somewhere else a URL would be gratefully received. ] What's the reasoning behind functions like sum() and cumsum() being provided both as module functions

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-23 Thread Sebastian Haase
On Mon, Jun 23, 2008 at 10:31 AM, Bob Dowling [EMAIL PROTECTED] wrote: [ I'm new here and this has the feel of an FAQ but I couldn't find anything at http://www.scipy.org/FAQ . If I should have looked somewhere else a URL would be gratefully received. ] What's the reasoning behind functions

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-23 Thread Robert Kern
On Mon, Jun 23, 2008 at 18:10, Sebastian Haase [EMAIL PROTECTED] wrote: On Mon, Jun 23, 2008 at 10:31 AM, Bob Dowling [EMAIL PROTECTED] wrote: [ I'm new here and this has the feel of an FAQ but I couldn't find anything at http://www.scipy.org/FAQ . If I should have looked somewhere else a URL

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-23 Thread Ryan May
Robert Kern wrote: On Mon, Jun 23, 2008 at 18:10, Sebastian Haase [EMAIL PROTECTED] wrote: On Mon, Jun 23, 2008 at 10:31 AM, Bob Dowling [EMAIL PROTECTED] wrote: [ I'm new here and this has the feel of an FAQ but I couldn't find anything at http://www.scipy.org/FAQ . If I should have looked

Re: [Numpy-discussion] ndarray methods vs numpy module functions

2008-06-23 Thread Robert Kern
On Mon, Jun 23, 2008 at 19:35, Ryan May [EMAIL PROTECTED] wrote: Robert Kern wrote: On Mon, Jun 23, 2008 at 18:10, Sebastian Haase [EMAIL PROTECTED] wrote: On Mon, Jun 23, 2008 at 10:31 AM, Bob Dowling [EMAIL PROTECTED] wrote: [ I'm new here and this has the feel of an FAQ but I couldn't find