[PyQt] Python extension and PyQt ?

Phil Thompson phil at riverbankcomputing.com
Mon Aug 31 22:34:07 BST 2015


On 31 Aug 2015, at 8:31 pm, garyr <garyr at fidalgo.net> wrote:
> 
> I've written a program using PyQt that processes large arrays of data. In an
> attempt to reduce the execution time I've written an extension module that
> implements the most CPU-intensive processing in C. The extension module returns
> two scalar doubles and a Python list of doubles. When run in a test
> program the module returns the same values as those calculated by equivalent
> Python code. But when run in the much larger GUI program it generates an
> exception:
> 
> File "LmsIm_PyQtGraph.pyw", line 477, in process
>   W0, W1, errs = self.lms.computeLMS(Nerrs, mu, Vx, Vrm, Vrmc)
> ValueError: ndarray is not contiguous
> 
> Are there special precautions that must be observed when using extension modules
> with PyQt?

None at all.

Phil


More information about the PyQt mailing list