[Numpy-discussion] histogramdd shapes

2007-03-17 Thread Ben Granett
Hi, There seems to be a problem with histogramdd (numpy 1.0.1). Depending on the number of bins in each axis, it may not produce an array with the dimensions oriented correctly. The bug is in the axis swapping code at the end of the routine. To reproduce, you can run, >>> x = random.randn(100,3)

[Numpy-discussion] scalar recordarrays

2007-03-17 Thread Matthew Koichi Grimes
I've found that if I have a record array of shape [] (i.e. a scalar recarray), I can't set its fields. >>> recarr recarray((0.0, 0.0, 0.0), dtype=[('x', '>> recarr.x[...] = 1.0 TypeError: object does not support item assignment In the above, recarr.x returned a float "0.0", then attempted

Re: [Numpy-discussion] Matlab -> NumPy translation and indexing

2007-03-17 Thread Stefan van der Walt
On Thu, Mar 15, 2007 at 12:26:10PM +0100, David Koch wrote: > Next thing, I have > > A_Idx = array([1, 0]) > > and B is a matrix. How would I select the four elements in B indicated by > "meshgrid(A_Idx)", that ist: B[1,1], B[1,0], B[0,1], B[0,0] > In Matlab you would simply use B(A_idx, A_idx) w

Re: [Numpy-discussion] import numpy segmentation fault

2007-03-17 Thread Cory Davis
Thanks Zach, yes, the SVN version works, Cheers, Cory. On 3/14/07, Zachary Pincus <[EMAIL PROTECTED]> wrote: > If I recall correctly, there's a bug in numpy 1.0.1 on Linux-x86-64 > that causes this segfault. This is fixed in the latest SVN version of > numpy, so if you can grab that, it should wor