<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Am 29.06.2012 10:57, schrieb David Cournapeau:</tt>
    <blockquote
cite="mid:CAGY4rcUoxzLyXd43kNQ8CZuQUTL8tvVyNekz7AFkDckAcT8EMA@mail.gmail.com"
      type="cite">
      <pre wrap=""><tt>
Is this on 32 or 64 bits windows ? Do you know if your customer uses
only numpy, or other packages that depend on numpy C extension ?
</tt></pre>
    </blockquote>
    <tt><br>
      It is 64 bit Windows. <br>
      I forgot to say that a part of my numpy arrays are generated by a
      short <br>
      Cython method wrapping open-ms library.<br>
      <br>
      As the code fragment is short, I post it here:</tt><tt><br>
    </tt>
    <blockquote><tt>def get_peaks(self):  <br>
        <br>
      </tt><tt>    cdef _MSSpectrum[_Peak1D] * spec_ = self.inst<br>
        <br>
      </tt><tt>    cdef unsigned int n = spec_.size()<br>
      </tt><tt>    cdef np.ndarray[np.float32_t, ndim=2] peaks <br>
      </tt><tt>    peaks = np.zeros( [n,2], dtype=np.float32)<br>
      </tt><tt>    cdef _Peak1D p<br>
        <br>
      </tt><tt>    cdef vector[_Peak1D].iterator it = spec_.begin()<br>
      </tt><tt>    cdef int i = 0<br>
      </tt><tt>    while it != spec_.end():<br>
      </tt><tt>        peaks[i,0] = deref(it).getMZ()<br>
      </tt><tt>        peaks[i,1] = deref(it).getIntensity()<br>
      </tt><tt>        preincrement(it)<br>
      </tt><tt>        i += 1<br>
        <br>
      </tt><tt>    return peaks<br>
      </tt></blockquote>
    <tt>I am sure that this functions does not crash during execution.<br>
      As spec_ 's class is derived from C++ STL std::vector<..>
      there should<br>
      be no conflict between counting 'i' up to 'n' and testing 'it'<br>
      against 'spec_.end()'.<br>
      <br>
      Regards, Uwe<br>
    </tt><br>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Dr. rer. nat. Uwe Schmitt
Leitung F/E Mathematik

mineway GmbH
Gebäude 4
Im Helmerswald 2
66121 Saarbrücken

Telefon: +49 (0)681 8390 5334
Telefax: +49 (0)681 830 4376

<a class="moz-txt-link-abbreviated" href="mailto:uschmitt@mineway.de">uschmitt@mineway.de</a>
<a class="moz-txt-link-abbreviated" href="http://www.mineway.de">www.mineway.de</a>

Geschäftsführung: Dr.-Ing. Mathias Bauer
Amtsgericht Saarbrücken HRB 12339




</pre>
  </body>
</html>