[Numpy-discussion] matrix indexing

2012-02-06 Thread Naresh Pai
I have two large matrices, say, ABC and DEF, each with a shape of 7000 by 4500. I have another list, say, elem, containing 850 values from ABC. I am interested in finding out the corresponding values in DEF where ABC has elem and store them *separately*. The code that I am using is: for i in range

[Numpy-discussion] fast method to to count a particular value in a large matrix

2012-02-04 Thread Naresh Pai
I am somewhat new to Python (been coding with Matlab mostly). I am trying to simplify (and expedite) a piece of code that is currently a bottleneck in a larger code. I have a large array (7000 rows x 4500 columns) titled say, abc, and I am trying to find a fast method to count the number of instan