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]
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
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
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
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]
__
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
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
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