Re: [Numpy-discussion] np.dot and scipy sparse matrices

2011-11-09 Thread Stéfan van der Walt
Hi Peter On Wed, Nov 9, 2011 at 3:38 AM, Peter Prettenhofer wrote: > I recently got the latest numpy version (2.0.0.dev-7297785) from the > git repo and realized that `np.dot` causes a segfault if its operands > are scipy sparse matrices. Here's some code to reproduce the problem:: > >   import n

Re: [Numpy-discussion] Sampling from the multivariate normal

2011-11-09 Thread Joshua Anthony Reyes
Hi Oliver, Robert, Thanks to both of you for your speedy and enlightening responses. They really cleared things up. Now my simulations seem to work as intended. All the best, Josh On 11/9/11 12:14 PM, Robert Kern wrote: > On Wed, Nov 9, 2011 at 16:40, Joshua Anthony Reyes > wrote: >> Hi List

Re: [Numpy-discussion] Sampling from the multivariate normal

2011-11-09 Thread Robert Kern
On Wed, Nov 9, 2011 at 16:40, Joshua Anthony Reyes wrote: > Hi List, > > I'm new to Numpy and I'm a little confused about the behavior of > numpy.random.multivariate_normal(). I'm not sure I'm passing the > variances correctly. My goal is to sample from a bivariate normal, but > the kooky behavior

Re: [Numpy-discussion] Sampling from the multivariate normal

2011-11-09 Thread Olivier Delalleau
The "normal" function takes as input the standard deviation, while "multivariate_normal" takes as input the covariance. -=- Olivier 2011/11/9 Joshua Anthony Reyes > Hi List, > > I'm new to Numpy and I'm a little confused about the behavior of > numpy.random.multivariate_normal(). I'm not sure I

[Numpy-discussion] Sampling from the multivariate normal

2011-11-09 Thread Joshua Anthony Reyes
Hi List, I'm new to Numpy and I'm a little confused about the behavior of numpy.random.multivariate_normal(). I'm not sure I'm passing the variances correctly. My goal is to sample from a bivariate normal, but the kooky behavior shows up when I sample from a univariate distribution. In short,

[Numpy-discussion] np.dot and scipy sparse matrices

2011-11-09 Thread Peter Prettenhofer
Hi everybody, I recently got the latest numpy version (2.0.0.dev-7297785) from the git repo and realized that `np.dot` causes a segfault if its operands are scipy sparse matrices. Here's some code to reproduce the problem:: import numpy as np from scipy import sparse as sp A = np.random.

[Numpy-discussion] Who has ever used treecluster in Pycluster?

2011-11-09 Thread 王鹤达
hi, Pycluster reports an error when the distancematrix is a matrix 6000*6000: ValueError: Row 0 in the distance matrix has incorrect size (6417 should be 0) Is anyone encountered this problem before? Is that because I should only use a left-lower matrix, and leave all else blank? Best,