Re: [Numpy-discussion] invalid correlation coefficient from np.ma.corrcoef

2013-09-25 Thread josef . pktd
On Wed, Sep 25, 2013 at 11:05 PM, wrote: > On Wed, Sep 25, 2013 at 8:26 PM, Faraz Mirzaei wrote: >> Hi everyone, >> >> I'm using np.ma.corrcoef to compute the correlation coefficients among rows >> of a masked matrix, where the masked elements are the missing data. I've >> observed that in some

Re: [Numpy-discussion] invalid correlation coefficient from np.ma.corrcoef

2013-09-25 Thread josef . pktd
On Wed, Sep 25, 2013 at 8:26 PM, Faraz Mirzaei wrote: > Hi everyone, > > I'm using np.ma.corrcoef to compute the correlation coefficients among rows > of a masked matrix, where the masked elements are the missing data. I've > observed that in some cases, the np.ma.corrcoef gives invalid coefficien

[Numpy-discussion] invalid correlation coefficient from np.ma.corrcoef

2013-09-25 Thread Faraz Mirzaei
Hi everyone, I'm using np.ma.corrcoef to compute the correlation coefficients among rows of a masked matrix, where the masked elements are the missing data. I've observed that in some cases, the np.ma.corrcoef gives invalid coefficients that are greater than 1 or less than -1. Here's an example:

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-25 Thread Warren Weckesser
On Wed, Sep 25, 2013 at 1:41 PM, David Goldsmith wrote: > Thanks, guys. Yeah, I realized the problem w/ the > uniform-increment-variable-direction approach this morning: physically, it > ignores the fact that the particles hitting the particle being tracked are > going to have a distribution of m

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-25 Thread David Goldsmith
Thanks, guys. Yeah, I realized the problem w/ the uniform-increment-variable-direction approach this morning: physically, it ignores the fact that the particles hitting the particle being tracked are going to have a distribution of momentum, not all the same, just varying in direction. But I don'

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-25 Thread Warren Weckesser
On Wed, Sep 25, 2013 at 12:51 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > > On Wed, Sep 25, 2013 at 9:36 AM, Neal Becker wrote: > >> David Goldsmith wrote: >> >> > Is this a valid algorithm for generating a 3D Wiener process? (When I >> > graph the results, they certainly look li

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-25 Thread Warren Weckesser
On Wed, Sep 25, 2013 at 9:36 AM, Neal Becker wrote: > David Goldsmith wrote: > > > Is this a valid algorithm for generating a 3D Wiener process? (When I > > graph the results, they certainly look like potential Brownian motion > > tracks.) > > > > def Wiener3D(incr, N): > > r = incr*(R.randi

[Numpy-discussion] Heads up re: new memory tracking infrastructure in python 3.4

2013-09-25 Thread Nathaniel Smith
Hi all, Possibly of interest to some folks here, it looks like in Python 3.4 there'll be a generic system for hooking and tracking memory allocations: http://www.python.org/dev/peps/pep-0445/ I'm not planning to do anything with this information myself, but if anyone's been thinking about numpy

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-25 Thread Neal Becker
David Goldsmith wrote: > Is this a valid algorithm for generating a 3D Wiener process? (When I > graph the results, they certainly look like potential Brownian motion > tracks.) > > def Wiener3D(incr, N): > r = incr*(R.randint(3, size=(N,))-1) > r[0] = 0 > r = r.cumsum() > t = 2*

Re: [Numpy-discussion] Numpy newbie question: matrix creation

2013-09-25 Thread Alan G Isaac
On 9/25/2013 3:06 AM, Edmondo Porcu wrote: > advice on how to create a matrix with certain characteristics : > - Every entry should be minimum 0 maximum 1 with a step of 0.1 (legal > values are 0,0.1,0.2,0.3 etc) > - The number of columns of the matrix is a parameter of this matrix creation > a

Re: [Numpy-discussion] Numpy newbie question: matrix creation

2013-09-25 Thread Robert Kern
On Wed, Sep 25, 2013 at 1:12 PM, Edmondo Porcu wrote: > > That's what I was looking for, except that I want to be sure to generate all the possible combinations, and to have no repeated values. Okay, then you need to find all of the integer partitions of 10 with `ncols` elements (padding with 0s

Re: [Numpy-discussion] Numpy newbie question: matrix creation

2013-09-25 Thread Edmondo Porcu
That's what I was looking for, except that I want to be sure to generate all the possible combinations, and to have no repeated values. Thanks Edmondo 2013/9/25 Robert Kern > On Wed, Sep 25, 2013 at 8:06 AM, Edmondo Porcu > wrote: > > > > Dear all, > > > > I am a Newbie with Numpy and I woul

Re: [Numpy-discussion] Numpy newbie question: matrix creation

2013-09-25 Thread Robert Kern
On Wed, Sep 25, 2013 at 8:06 AM, Edmondo Porcu wrote: > > Dear all, > > I am a Newbie with Numpy and I would need some advice on how to create a matrix with certain characteristics : > > - Every entry should be minimum 0 maximum 1 with a step of 0.1 (legal values are 0,0.1,0.2,0.3 etc) > > - The

Re: [Numpy-discussion] Numpy newbie question: matrix creation

2013-09-25 Thread Stéfan van der Walt
On Wed, Sep 25, 2013 at 9:06 AM, Edmondo Porcu wrote: > I am a Newbie with Numpy and I would need some advice on how to create a > matrix with certain characteristics : > > - Every entry should be minimum 0 maximum 1 with a step of 0.1 (legal > values are 0,0.1,0.2,0.3 etc) You can generate rand

[Numpy-discussion] Numpy newbie question: matrix creation

2013-09-25 Thread Edmondo Porcu
Dear all, I am a Newbie with Numpy and I would need some advice on how to create a matrix with certain characteristics : - Every entry should be minimum 0 maximum 1 with a step of 0.1 (legal values are 0,0.1,0.2,0.3 etc) - The number of columns of the matrix is a parameter of this matrix creati

[Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-25 Thread David Goldsmith
Is this a valid algorithm for generating a 3D Wiener process? (When I graph the results, they certainly look like potential Brownian motion tracks.) def Wiener3D(incr, N): r = incr*(R.randint(3, size=(N,))-1) r[0] = 0 r = r.cumsum() t = 2*np.pi*incr*(R.randint(3, size=(N,))-1)