Re: [Chennaipy] Mutli- threading in cython

2018-06-05 Thread aishwarya selvaraj
Hi, With npstrides[1] = 2, it worked perfectly. Thank you. ᐧ On Sat, Jun 2, 2018 at 1:01 PM, Aravindhan K wrote: > Hi, > > Use the version of code that is mentioned in your NOTE 4. > > But why are you keeping np.dtype('<'B) instead of np.dtype('<'H') ? in > > data[i,:,:] = PyArray_NewFromDesc

Re: [Chennaipy] Mutli- threading in cython

2018-06-02 Thread Aravindhan K
Hi, Use the version of code that is mentioned in your NOTE 4. But why are you keeping np.dtype('<'B) instead of np.dtype('<'H') ? in data[i,:,:] = PyArray_NewFromDescr( np.ndarray, np.dtype(' wrote: > Hi, > I tried the changes. No was not able to solve my issue. I'm attaching the > file. Kind

Re: [Chennaipy] Mutli- threading in cython

2018-06-01 Thread aishwarya selvaraj
Hi, I tried the changes. No was not able to solve my issue. I'm attaching the file. Kindly take a look at it. ᐧ On Mon, May 28, 2018 at 10:21 PM, Aravindhan K wrote: > Hi, > > See the comments starts with NOTE in the attached file. > Hope that may guide you find the issue. > > Regards, > Araind

Re: [Chennaipy] Mutli- threading in cython

2018-05-27 Thread aishwarya selvaraj
Hi, Yes, I was able to make use of PyArray_NewFromDescr in my code. Storing into a 3D array has now become a lot faster. Thank you!But the CCD images stored using this method looks quite different from the ones acquired earlier. In the older method at the end of for loop, there is incrementing us

Re: [Chennaipy] Mutli- threading in cython

2018-05-22 Thread Aravindhan K
Hi, Please use this example code. https://pastebin.com/nh9rvqfm. I have used this link as a reference. https://groups.google.com/forum/#!topic/cython-users/fFBiCCwblD0 Regards, Aravindhan K On Tue, May 22, 2018 at 11:58 AM, aishwarya selvaraj < aishwaryaselvaraj1...@gmail.com> wrote: > Hi, > Th

Re: [Chennaipy] Mutli- threading in cython

2018-05-21 Thread aishwarya selvaraj
Hi, Thank you for the suggestion. I was trying out an example code using PyArray_NewFromDescr*.* PFA of the code.I compiled the file using :python setup.py build_ext --inplace. When compiled I get the following error : fatal error : numpy/arrayobject.h :No such file or directory. I would be realy g

Re: [Chennaipy] Mutli- threading in cython

2018-05-21 Thread Aravindhan K
Hi, You could try using PyArray_NewFromDescr NumPy C-API function for creating nd-array in function capturing frames. than doing nested loops to do copy byte by byte. (This could be the bottleneck) https://docs.scipy.org/doc/numpy-1.14.0/reference/c-api.array.html#from-scratch Regards, Aravindha