You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to use jmatio to read multi-dimensional arrays created in matlab into a scala app. It appears there is a bug in the way the indices are computed. In the MLArray constructor dimsFactors is initialized from the highest dimension to the lowest, but Matlab arrays are stored in column major format. So I think dimsFactors should really be initialized starting with dimension 0 and going up.
I'm submitting a pull request with more info and proposed fixes.
The text was updated successfully, but these errors were encountered:
For reference #9 is the PR that fixed this issue. Turns out that MatFileRW had multi-dimensional index ordering wrong. For 1D and 2D arrays, everything worked, but it was broken for 3D and higher. If the array happened to be square (e.g. 10x10x10x10) then it still worked, but only by luck.
This is such an important bug that I think it's worth bumping to 3.0.0 to draw attention to the bug and its fix. It's possible that others have already worked-around this bug, so alerting them to the change will let them know to remove their workaround.
I've been trying to use jmatio to read multi-dimensional arrays created in matlab into a scala app. It appears there is a bug in the way the indices are computed. In the MLArray constructor dimsFactors is initialized from the highest dimension to the lowest, but Matlab arrays are stored in column major format. So I think dimsFactors should really be initialized starting with dimension 0 and going up.
I'm submitting a pull request with more info and proposed fixes.
The text was updated successfully, but these errors were encountered: