Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-28 Thread Christopher Barker
Travis Oliphant wrote: > I think I prefer to just add the float, bool, object, unicode, str names > to the "non-imported" numpy > name-space. which mean you get it with: import numpy as N N.float but not with from numpy import * ? If that's what you mean, then I'm all for it! -Chris --

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-28 Thread Travis Oliphant
Christopher Barker wrote: > Travis Oliphant wrote: > > >> Instead, I like better the idea of adding abs, round, max, and min to >> the "non-import-*" namespace of numpy. >> > > Another I'd like is the built-in data types. I always use: > > import numpy as N > > so then I do: > > a = zeros(

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-28 Thread Christopher Barker
Travis Oliphant wrote: > Instead, I like better the idea of adding abs, round, max, and min to > the "non-import-*" namespace of numpy. Another I'd like is the built-in data types. I always use: import numpy as N so then I do: a = zeros(shape, float) or a = zeros(shape, N.float_) but for non

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread Sebastian Haase
Travis Oliphant wrote: > Sebastian Haase wrote: >> On Wednesday 23 August 2006 18:37, Travis Oliphant wrote: >> >>> David M. Cooke wrote: >>> On Wed, 23 Aug 2006 16:22:52 -0700 Sebastian Haase <[EMAIL PROTECTED]> wrote: > On Wednesday 23 August 2006 16:12, Bil

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread Travis Oliphant
Sebastian Haase wrote: > On Wednesday 23 August 2006 18:37, Travis Oliphant wrote: > >> David M. Cooke wrote: >> >>> On Wed, 23 Aug 2006 16:22:52 -0700 >>> >>> Sebastian Haase <[EMAIL PROTECTED]> wrote: >>> On Wednesday 23 August 2006 16:12, Bill Baxter wrote:

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread Sebastian Haase
On Wednesday 23 August 2006 18:37, Travis Oliphant wrote: > David M. Cooke wrote: > > On Wed, 23 Aug 2006 16:22:52 -0700 > > > > Sebastian Haase <[EMAIL PROTECTED]> wrote: > >> On Wednesday 23 August 2006 16:12, Bill Baxter wrote: > >>> The thing that I find I keep forgetting is that abs() is a bui

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread Travis Oliphant
David M. Cooke wrote: > On Wed, 23 Aug 2006 16:22:52 -0700 > Sebastian Haase <[EMAIL PROTECTED]> wrote: > > >> On Wednesday 23 August 2006 16:12, Bill Baxter wrote: >> >>> The thing that I find I keep forgetting is that abs() is a built-in, but >>> other simple functions are not. So it's a

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread Fernando Perez
On 8/23/06, Bill Baxter <[EMAIL PROTECTED]> wrote: > The thing that I find I keep forgetting is that abs() is a built-in, but > other simple functions are not. So it's abs(foo), but numpy.floor(foo) and > numpy.ceil(foo). And then there's round() which is a built-in but can't be > used with array

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread David M. Cooke
On Wed, 23 Aug 2006 16:22:52 -0700 Sebastian Haase <[EMAIL PROTECTED]> wrote: > On Wednesday 23 August 2006 16:12, Bill Baxter wrote: > > The thing that I find I keep forgetting is that abs() is a built-in, but > > other simple functions are not. So it's abs(foo), but numpy.floor(foo) > > and num

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread Sebastian Haase
On Wednesday 23 August 2006 16:12, Bill Baxter wrote: > The thing that I find I keep forgetting is that abs() is a built-in, but > other simple functions are not. So it's abs(foo), but numpy.floor(foo) and > numpy.ceil(foo). And then there's round() which is a built-in but can't be > used with ar

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread Bill Baxter
The thing that I find I keep forgetting is that abs() is a built-in, but other simple functions are not.  So it's abs(foo), but numpy.floor(foo) and numpy.ceil(foo).  And then there's round() which is a built-in but can't be used with arrays, so numpy.round_(foo).    Seems like it would be more co

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread David M. Cooke
On Wed, 23 Aug 2006 13:51:02 -0700 Sebastian Haase <[EMAIL PROTECTED]> wrote: > Hi! > numpy renamed the *function* abs to absolute. > Most functions like mean, min, max, average, ... > have an equivalent array *method*. > > Why is absolute left out ? > I think it should be added . We've got __ab

[Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread Sebastian Haase
Hi! numpy renamed the *function* abs to absolute. Most functions like mean, min, max, average, ... have an equivalent array *method*. Why is absolute left out ? I think it should be added . Furthermore, looking at some line of code that have multiple calls to absolute [ like f(absolute(a), abso

[Numpy-discussion] request for new array method: arr.abs()

2006-08-15 Thread Sebastian Haase
Hi! numpy renamed the *function* abs to absolute. Most functions like mean, min, max, average, ... have an equivalent array *method*. Why is absolute left out ? I think it should be added . Furthermore, looking at some line of code that have multiple calls to absolute [ like f(absolute(a), abso