[Numpy-discussion] diagflat

2006-09-03 Thread Charles R Harris
Travis has introduced the function diagflat for creating diagonal arrays. It flattens whatever array is supplied and returns its values as the diagonal of a 2-D array or matrix. As the function is currently undocumented I thought now might be a good time to discuss other possible choices for the na

[Numpy-discussion] Problem with concatenate and object arrays

2006-09-03 Thread Fernando Perez
Hi all, I'm wondering if the following difference in behavior of object arrays should be considered a bug. Let a and b be: In [21]: a = [0,1] In [22]: b = [ None, None] If we concatenate a with an empty list, it works: In [23]: numpy.concatenate(([],a)) Out[23]: array([0, 1]) But not so for

Re: [Numpy-discussion] diagflat

2006-09-03 Thread Nils Wagner
On Sun, 3 Sep 2006 12:20:09 -0600 "Charles R Harris" <[EMAIL PROTECTED]> wrote: > Travis has introduced the function diagflat for creating >diagonal arrays. It > flattens whatever array is supplied and returns its >values as the diagonal > of a 2-D array or matrix. As the function is currently

Re: [Numpy-discussion] Problem with concatenate and object arrays

2006-09-03 Thread Charles R Harris
On 9/3/06, Fernando Perez <[EMAIL PROTECTED]> wrote: Hi all,I'm wondering if the following difference in behavior of object arrays shouldbe considered a bug.  Let a and b be:In [21]: a = [0,1]In [22]: b = [ None, None]If we concatenate a with an empty list, it works: In [23]: numpy.concatenate(([],

Re: [Numpy-discussion] Problem with concatenate and object arrays

2006-09-03 Thread Robert Kern
Charles R Harris wrote: > On 9/3/06, *Fernando Perez* <[EMAIL PROTECTED] > > wrote: > > Hi all, > > I'm wondering if the following difference in behavior of object > arrays should > be considered a bug. Let a and b be: > > In [21]: a = [0,1] > >

[Numpy-discussion] Remco Jager/mapper is out of the office.

2006-09-03 Thread R . Jager
I will be out of the office starting 09/04/2006 and will not return until 09/25/2006. I will respond to your message when I return. For urgent matters please contact Ton van de Peut: [EMAIL PROTECTED] - Using Tomcat but ne

[Numpy-discussion] bug in round with negative number of decimals

2006-09-03 Thread Sebastian Haase
Hi, I just learn about the existence of round(). Is the following exposing a bug? >>> N.__version__ '1.0b4' >>> N.array([65.0]) [ 65.] >>> _.round(-1) [ 60.] >>> round(65, -1) 70.0 >>> N.array([65]) [65] >>> _.round(-1) [60] >>> N.array([66]) [66] >>> _.round(-1) [60] >>> N.array([66.2]) [

Re: [Numpy-discussion] bug in round with negative number of decimals

2006-09-03 Thread Charles R Harris
On 9/3/06, Sebastian Haase <[EMAIL PROTECTED]> wrote: Hi,I just learn about the existence of round().Is the following exposing a bug? >>> N.__version__'1.0b4' >>> N.array([65.0])[ 65.] >>> _.round(-1)[ 60.] >>> round(65, -1) 70.0 >>> N.array([65])[65] >>> _.round(-1)[60] >>> N.array([66])[66] >>> _

[Numpy-discussion] Random number generators

2006-09-03 Thread Charles R Harris
Hi Robert,I am about to get started on some stuff for the random number generators but thought I would run it by you first. I envisage the following:uniform short_doubles -- doubles generated from a single 32 bit random number (advantage: speed) uniform double, short_doubles on the interval (0,1) -

Re: [Numpy-discussion] Random number generators

2006-09-03 Thread A. M. Archibald
On 04/09/06, Charles R Harris <[EMAIL PROTECTED]> wrote: > Except for the last, none conflict with current routines and can be added > without a branch. I expect adding MWC8222 might need more extensive work and > I will branch for that. So the questions are of utility and naming. I see > some uti

Re: [Numpy-discussion] bug in round with negative number of decimals

2006-09-03 Thread Sebastian Haase
Charles R Harris wrote: > > > On 9/3/06, *Sebastian Haase* <[EMAIL PROTECTED] > > wrote: > > Hi, > I just learn about the existence of round(). > Is the following exposing a bug? > >>> N.__version__ > '1.0b4' > >>> N.array([65.0]) > [ 65.]

Re: [Numpy-discussion] diagflat

2006-09-03 Thread A. M. Archibald
On 03/09/06, Charles R Harris <[EMAIL PROTECTED]> wrote: Travis has introduced the function diagflat for creating diagonal arrays. It flattens whatever array is supplied and returns its values as the diagonal of a 2-D array or matrix. As the function is currently undocumented I thought now might

Re: [Numpy-discussion] Random number generators

2006-09-03 Thread Robert Kern
Charles R Harris wrote: > Hi Robert, > > I am about to get started on some stuff for the random number generators > but thought I would run it by you first. I envisage the following: > > uniform short_doubles -- doubles generated from a single 32 bit random > number (advantage: speed) > uniform

Re: [Numpy-discussion] bug in round with negative number of decimals

2006-09-03 Thread A. M. Archibald
On 04/09/06, Sebastian Haase <[EMAIL PROTECTED]> wrote: > Thanks for the reply - but read what the doc says: > >>> N.around.__doc__ > 'Round 'a' to the given number of decimal places. Rounding > behaviour is equivalent to Python. > > Return 'a' if the array is not floating point. Roun

Re: [Numpy-discussion] Random number generators

2006-09-03 Thread Robert Kern
A. M. Archibald wrote: > In the same project I also noticed it would be nice to be able to > (say) do "exponential(2+sin(arange(10)))" to get an array of > exponentials with varying parameters. Travis O. recently added this capability. The distribution parameters (loc, scale, alpha, whatever) ar

Re: [Numpy-discussion] Random number generators

2006-09-03 Thread A. M. Archibald
On 04/09/06, Robert Kern <[EMAIL PROTECTED]> wrote: > A. M. Archibald wrote: > > > In the same project I also noticed it would be nice to be able to > > (say) do "exponential(2+sin(arange(10)))" to get an array of > > exponentials with varying parameters. > > Travis O. recently added this capabilit

Re: [Numpy-discussion] Random number generators

2006-09-03 Thread Charles R Harris
On 9/3/06, Robert Kern <[EMAIL PROTECTED]> wrote: Charles R Harris wrote:> Hi Robert,>> I am about to get started on some stuff for the random number generators> but thought I would run it by you first. I envisage the following:>> uniform short_doubles -- doubles generated from a single 32 bit rand