[Python] Multithreaded version of transpose of multidimensional array in Python

Discussão em 'Python' iniciado por Stack, Agosto 7, 2025.

  1. Stack

    Stack Membro Participativo

    Is there multithreaded version of transpose of multidimensional array in Python? Traditional Numpy transpose works only on 1 CPU thread and works too slow because of that.

    My code that works too slow:

    import numpy as np
    # data is array of uint16
    data = np.transpose(data, axes=(1, 2, 3, 0))


    For data of shape (16, 938, 299, 299) it has been working for half an hour and hasn't finished yet! Also it consumed 20 GB of RAM.

    Continue reading...

Compartilhe esta Página