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

Guarantee that .as_slice_memory_order_mut() preserves strides #1019

Merged

Commits on May 31, 2021

  1. Remove unnecessary closure

    jturner314 committed May 31, 2021
    Copy the full SHA
    cadee2b View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    15b0808 View commit details
    Browse the repository at this point in the history
  3. Guarantee that as_slice_memory_order_mut preserves strides

    This fixes bugs in `.map_mut()` and `.zip_mut_with_same_shape()`.
    Before this commit, strides obtained before calling
    `.as_slice_memory_order_mut()` could not be used to correctly
    interpret the data in the returned slice. Now, the strides are
    preserved, so the implementations of `.map_mut()` and
    `.zip_mut_with_same_shape()` work correctly. This also makes it much
    easier for users of the crate to use `.as_slice_memory_order_mut()`
    correctly in generic code.
    
    Fixes rust-ndarray#1018.
    jturner314 committed May 31, 2021
    Copy the full SHA
    37645bd View commit details
    Browse the repository at this point in the history