[PyQt] Python extension and PyQt ?

garyr garyr at fidalgo.net
Mon Aug 31 20:31:17 BST 2015

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

  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?

More information about the PyQt mailing list