rpi-ws281x-matrix-python icon indicating copy to clipboard operation
rpi-ws281x-matrix-python copied to clipboard

Consider to use numpy for faster matrix operations

Open stsdc opened this issue 3 years ago • 0 comments

First of all I want to thank You for such a wonderful library. Even 0.0.2 version is pretty cool! :smile:

I'm using it to reactively display some low latency animation based on sound. I process audio and put a result of it into a numpy array, which allows to make all the operations really fast compared to standard Python functions.

However the bottleneck is that I have to convert numpy array to Python list which is really time consuming for a hundreds of pixels.

        frame  = np.zeros((32, 16, 3), dtype=np.uint8)
        self.next_frame(frame.tolist())

I'm wondering if it's possible to speedup things and add support for a numpy?

stsdc avatar Feb 08 '21 23:02 stsdc