how to do the mapping btw numpy arrayvalues and matrix columns

devnew at gmail.com devnew at gmail.com
Sat Nov 3 02:08:09 EDT 2007


hi
i am looking for some info about mapping  btw values in an array and
corresponding columns of a matrix

i have an numpy array=[11.0,33.0,22.0,55.0,44.0]
and a numpy matrix object=
                   matrix(([1.3,2.5,3.2,6.7,3.1],
                              [9.7,5.6,4.8,2.5,2.2],
                              [5.1,3.7,9.6,3.1,6.7],
                              [5.6,3.3,1.5,2.4,8.5]))
the first value of array(ie 11.0) is related to the first column of
matrix  and so on..
i wish to create a mapping btw each val of array and corresponding col
of matrix..and then i want to sort the array and retrieve the matrix
columns for some values of sorted array..can anyone advise how to go
about it..

dn




More information about the Python-list mailing list