What it takes to transpose a matrix

(gudok.xyz)

53 points | by tosh 1 day ago

2 comments

  • asplake 1 hour ago
    Is transposition a common enough operation that it might be better to avoid it by having versions of the operations/functions that take matrices that do the necessary transpositions implicitly?
    • rhdunn 13 minutes ago
      IIRC, libraries like numpy and pytorch can already do that as they store the matrices as 1D arrays with information on things like the stride length (advancing to the next row). That allows you to implement operations like transposition by editing the stride length and other parameters without manipulating the content of the matrix array.
    • threatripper 54 minutes ago
      This is already done as much as possible by reordering and merging operations but transposition (explicit or implicit) is unavoidable for some operations.
  • bhupendraTale05 1 day ago
    [flagged]