Re: [Numpy-discussion] Summing indices of heterogeneous shapes

2008-04-22 Thread Michael Hoffman
Michael Hoffman wrote: > In the following example I can sum up lists of column indices: > > >>> x = numpy.arange(30) > >>> x.shape = (6, 5) > >>> x > array([[ 0, 1, 2, 3, 4], > [ 5, 6, 7, 8, 9], > [10, 11, 12, 13, 14]

[Numpy-discussion] Summing indices of heterogeneous shapes

2008-04-21 Thread Michael Hoffman
if I wanted to set cols = [[0, 1], [2, 3], [1, 2, 3]]? What's the best way to get a sensible result? Thanks! -- Michael Hoffman ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Run length encoding of an ndarray

2007-10-02 Thread Michael Hoffman
Michael Hoffman wrote: > I am trying to do a type of run-length encoding of a 2D array by axis. I > have an array of values arranged along two axes, state and position. > These are many (180, 3) uint8 arrays. > > I would like to have a list of tuples like > > (stat

[Numpy-discussion] Run length encoding of an ndarray

2007-10-02 Thread Michael Hoffman
I am trying to do a type of run-length encoding of a 2D array by axis. I have an array of values arranged along two axes, state and position. These are many (180, 3) uint8 arrays. I would like to have a list of tuples like (state, start_pos, end_pos, values) only separating out a set of va

Re: [Numpy-discussion] Naming a slice index?

2007-10-02 Thread Michael Hoffman
Eagle Jones wrote: > New to python and numpy; hopefully I'm missing something obvious. I'd > like to be able to slice an array with a name. For example: > > _T = 6:10 > _R = 10:15 from numpy import index_exp _T = index_exp[6:10] _R = index_exp[10:15] > A = identity(20) > foo = A[_T, _R] __

[Numpy-discussion] SOLVED Re: Building numpy 1.0.3-2 on Linux 2.6.8 i686 (Debian 3.1)

2007-09-15 Thread Michael Hoffman
Michael Hoffman wrote: I have finally solved this problem. > """ > $ CFLAGS= LDFLAGS= > LD_LIBRARY_PATH=/nfs/acari/mh5/arch/Linux-x86_64/opt/python-2.5.1/lib > /nfs/acari/mh5/arch/Linux-x86_64/opt/python-2.5.1/bin/python setup.py -v > build "LDFLAGS= pytho

Re: [Numpy-discussion] Building numpy 1.0.3-2 on Linux 2.6.8 i686 (Debian 3.1)

2007-06-30 Thread Michael Hoffman
David Cournapeau wrote: > Michael Hoffman wrote: >> Hi. I have been trying to build NumPy on a 32-bit Linux box using python >> setup.py build. I received the following errors: >> [...] > > Which distribution are you building on ? Which Linux distribution? Debi

[Numpy-discussion] Building numpy 1.0.3-2 on Linux 2.6.8 i686 (Debian 3.1)

2007-06-30 Thread Michael Hoffman
alg/lapack_litemodule.o -L/usr/lib/sse2 -L/usr/lib -lf77blas -lcblas -latlas -llapack -lg2c-pic -o build/lib.linux-i686-2.5/numpy/linalg/lapack_lite.so" failed with exit status 1 """ After some Googling, I found a recommendation to unset CFLAGS and LDFLAGS, but they are not s