[Numpy-discussion] Fwd: Looping and searching in numpy array

2016-03-10 Thread Hedieh Ebrahimi
Dear all, I need to loop over a numpy array and then do the following search. The following is taking almost 60(s) for an array (npArray1 and npArray2 in the example below) with around 300K values. In other words, I am looking for the index of the first occurence in npArray2 for every value of n

[Numpy-discussion] using loadtxt to load a text file in to a numpy array

2014-01-15 Thread Hedieh Ebrahimi
Hello, I am trying to use the following line of code : fileContent=loadtxt(filePath,dtype=str) in order to load a text file located at path= filePath in to a numpy array called fileContent. I´ve simplifed my file for the purpose of this question but the file looks something like this: file Co