<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">Hi, </div><div class="gmail_default" style="color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">Thank you for the suggestion. I was trying out an example code using
</font><code class="gmail-m_8176624321788378293gmail-descname" style="color:rgb(34,34,34);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif" style="font-weight:bold">PyArray_NewFromDescr</font><font face="arial, sans-serif" style=""><span style="font-size:12.8px"><b>.</b> PFA of the code.I compiled the file using :python setup.py build_ext --inplace.<br>When compiled I get the following error :<br>fatal error : numpy/arrayobject.h :No such file or directory.<br>I would be realy gratefull if you could do the edit in the file I sent in my first mail.</span></font></code></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000"><br></div></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aYWlzaHdhcnlhc2VsdmFyYWoxNzA4QGdtYWlsLmNvbQ%3D%3D&type=zerocontent&guid=f38b768c-a760-45f8-848e-1ebb77e0b689"><font color="#ffffff" size="1">ᐧ</font></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 21, 2018 at 9:19 PM, Aravindhan K <span dir="ltr"><<a href="mailto:aravindhank1994@gmail.com" target="_blank">aravindhank1994@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br></div><div><br>You could try using <code class="m_8176624321788378293gmail-descname">PyArray_NewFromDescr</code> NumPy C-API function for creating nd-array<br>in function capturing frames.<br>than doing nested loops to do copy byte by byte. (This could be the bottleneck)<br><a href="https://docs.scipy.org/doc/numpy-1.14.0/reference/c-api.array.html#from-scratch" target="_blank">https://docs.scipy.org/doc/<wbr>numpy-1.14.0/reference/c-api.<wbr>array.html#from-scratch</a><br></div><br></div><div><br>Regards,<br></div>Aravindhan K<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, May 21, 2018 at 5:12 PM, aishwarya selvaraj <span dir="ltr"><<a href="mailto:aishwaryaselvaraj1708@gmail.com" target="_blank">aishwaryaselvaraj1708@gmail.<wbr>com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">Dear all, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">
<div class="gmail_default" style="font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">I was programming for Andor CCD using SDK libraries in python using cython.</div><div class="gmail_default" style="font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">I have a piece of code within my .pyx script which does the function of storing the data into a 3D array. While acquiring n frames, each of them is stored in a 3D array named data, which later I would be displaying. But this creates a bottleneck in my code. <br>Hence I need to introduce threading, such that for each frame to be stored there are individual threads for the same and the frames could be displayed simultaneously without creating a performance lag.<br>Since I have never worked on multithreading, could anyone please help me. <br>PFA of the code. (LiveAcquisition code)</div><span class="m_8176624321788378293HOEnZb"><font color="#888888">
<br></font></span></div><span class="m_8176624321788378293HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_8176624321788378293m_5961505490369600134gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<br>Aishwarya Selvaraj</div></div>
</font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
Chennaipy mailing list<br>
<a href="mailto:Chennaipy@python.org" target="_blank">Chennaipy@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/chennaipy" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/chennaipy</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Chennaipy mailing list<br>
<a href="mailto:Chennaipy@python.org">Chennaipy@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/chennaipy" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/chennaipy</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<br>Aishwarya Selvaraj</div></div>
</div>