What do you mean by "normalized it"?<div>Could you give the output of your procedure for the sample input data.</div><div>Val<br><br><div class="gmail_quote">On Thu, May 31, 2012 at 12:36 AM, Wolfgang Kerzendorf <span dir="ltr"><<a href="mailto:wkerzendorf@gmail.com" target="_blank">wkerzendorf@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
I have an ndarray which consists of many arrays stacked behind each other (only conceptually, in truth it's a normal 1d float64 array).<br>
I have a second array which tells me the start of the individual data sets in the 1d float64 array and another one which tells me the length.<br>
Example:<br>
<br>
data_array = (conceptually) [[1,2], [1,2,3,4], [1,2,3]] = in reality [1,2,1,2,3,4,1,2,3, dtype=float64]<br>
start_pointer = [0, 2, 6]<br>
length_data = [2, 4, 3]<br>
<br>
I now want to normalize each of the individual data sets. I wrote a simple for loop over the start_pointer and length data grabbed the data and normalized it and wrote it back to the big array. That's slow. Is there an elegant numpy way to do that? Do I have to go the cython way?<br>

<br>
Cheers<br>
   Wolfgang<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div><br></div>