Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking changes in 3.0.0 #11

Closed
nedtwigg opened this issue Nov 13, 2016 · 4 comments
Closed

Breaking changes in 3.0.0 #11

nedtwigg opened this issue Nov 13, 2016 · 4 comments

Comments

@nedtwigg
Copy link
Member

Hi users! We've found a bug that requires some breaking changes to fix. Since we've gotta break compat anyway, this seems like a nice opportunity to clean up a few other warts. I'm looking for comments on the things we're currently planning on breaking in 3.0.0:

  • Fixed multidimensional array indexing (see #10).
    • For arrays with dimension 1 or 2, there is no change.
    • For arrays with dimension 3 and up, matfilerw 2.x did not order the dimensions in the column-major format used by MATLAB. In 3.x forward, matfilerw uses the same column-major format as MATLAB.
  • Complex and non-complex arrays now have separate methods.
    • MLNumericArray has methods getReal/setReal, getImaginary/setImaginary, and get/set.
    • In 2.x using the imaginary methods on a non-imaginary matrix would fail silently, and get/set were synonymous with getReal/setReal
    • In 3.x, you can't use getReal/setReal on a non-complex matrix, and you can't use get/set on a complex matrix.

I'm tagging a few here who might be interested: @tmrn411, @mikaelgrev, @sinjax, @no-man-is-an-island, @gradusnikov.

@nedtwigg
Copy link
Member Author

nedtwigg commented Nov 13, 2016

After a little more thought, I'm rethinking the getReal/setReal, getImaginary/setImaginary, and get/set division. Complex arrays should really be a different type, but that's a bigger change than we can handle. I think I'll remove the restrictions on getReal/setReal vs get/set so that it has the same behavior as 2.x.

Edit: done in 73c3a63

@tmrn411
Copy link
Contributor

tmrn411 commented Nov 14, 2016

Just as point of reference, in Matlab real() and imag() work just fine on non-complex variables. imag() just returns 0 in that case. So I think the 2.x behavior is reasonable.

@nedtwigg
Copy link
Member Author

Thanks for the info @tmrn411. 12858a6 makes sure that imaginary will return 0 for all non-complex arrays.

@nedtwigg
Copy link
Member Author

Shipped 3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants