Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: conceptofmind/ndarray
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: rust-ndarray/ndarray
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 30 files changed
  • 11 contributors

Commits on Feb 16, 2026

  1. perf(iteration): use move instead of clone for iteration (rust-ndarra…

    …y#1586)
    
    @scho-furiosa pointed out in rust-ndarray#1584 that there was an unnecessary `clone`
    in `Baseiter::next` that was degrading performance for
    dynamic-dimensional arrays. This change switches to a move, netting a
    74% speedup in iteration for dynamic-dimensional arrays.
    
    Tests (detailed in rust-ndarray#1584) showed that there was a trade-off in
    performance between dynamic- and fixed-dimensional iteration. `ArrayD`
    performs best when mutating its index; `ArrayN` performs best when using
    a move. This is an indication that, in the future, `Baseiter::next`
    should dispatch to the "layout" / `Dimension` underlying type.
    
    Co-authored-by: Sungkeun Cho <[email protected]>
    akern40 and scho-furiosa authored Feb 16, 2026
    Configuration menu
    Copy the full SHA
    27af864 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2026

  1. chore: update msrv to 1.87 (rust-ndarray#1597)

    Unfortunately, as tends to happen, the ground has shifted beneath our
    feet, and we now need MSRV 1.87 to run with our dependencies. The good
    news is that this will allow us to go to the 2024 edition. Onwards and
    upwards!
    akern40 authored Jun 6, 2026
    Configuration menu
    Copy the full SHA
    fbcf3bf View commit details
    Browse the repository at this point in the history
  2. fix: permute_axes bug (rust-ndarray#1596)

    As pointed out in rust-ndarray#1589, permute_axes had a bug. This uses a simple
    algorithm to fix it; explanations for this algorithm are all over the
    internet, it's nothing fancy. I did take the opportunity to introduce
    proptest, which I'd like to make more use of over time.
    
    Down the line, it would be good to change the argument to `permute_axes`
    to be something like `T: Permutation`. Right now, `permute_axes` just
    has an assertion that the input is a real permutation. I'd call that a
    classic example of this library opting for asserts when we could be
    using better typing. But I think that will be easier / better to
    introduce after the core rework.
    
    Closes #1859
    akern40 authored Jun 6, 2026
    Configuration menu
    Copy the full SHA
    794f670 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8cf2c32 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0612fb7 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2026

  1. Configuration menu
    Copy the full SHA
    bd3ade9 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2026

  1. Configuration menu
    Copy the full SHA
    c95d814 View commit details
    Browse the repository at this point in the history
  2. ci: run latest-deps check daily and add stable clippy (rust-ndarray#1623

    )
    
    New Rust releases periodically break CI through new lints and
    deprecations (rust-ndarray#1620 was the latest), and we usually find out from
    failures on unrelated PRs. Running this check daily, and including
    stable clippy, should surface those breakages on `master` within a day.
    
    Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
    akern40 and devin-ai-integration[bot] authored Oct 18, 2026
    Configuration menu
    Copy the full SHA
    ace739e View commit details
    Browse the repository at this point in the history
  3. fix: prevent stack overflow in F-order triu/tril (rust-ndarray#1616)

    The F-order fast paths in triu and tril swap the last two axes and call
    each other. That is only safe for 2D arrays, where the swap yields a
    C-contiguous view. Higher-D F-and-not-C views (for example a C-order
    transpose followed by insert_axis) can remain F-and-not-C after the swap,
    so the two functions recurse until they overflow the stack.
    
    Restrict the shortcut to ndim == 2 so normal 2D .f() arrays keep the
    optimization, while the issue rust-ndarray#1615 repro takes the non-recursive path.
    cestercian authored Oct 18, 2026
    Configuration menu
    Copy the full SHA
    b301b7a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    98957ca View commit details
    Browse the repository at this point in the history
  5. fix: inverted is_all_nan / is_any_nan / is_all_infinite / is_any_infi…

    …nite (rust-ndarray#1614)
    
    The boolean_ops! macro in src/numeric/impl_float_maths.rs had an inverted $all
    predicate: Zip::from(self).all(|&elt| !elt.$func()) tests "all elements are NOT
    NaN", the opposite of the documented "true if all elements are NaN". $any was
    defined as !self.$all(), so the double negation made is_any_* appear correct
    while is_all_* returned true for an all-finite array.
    
    Correct both predicates together (fixing only $all would break the is_any_*
    methods that ride on the double negation):
      $all -> Zip::from(self).all(|&elt| elt.$func())
      $any -> Zip::from(self).any(|&elt| elt.$func())
    
    Empty-array semantics are preserved (all -> true, any -> false).
    youdie006 authored Oct 18, 2026
    Configuration menu
    Copy the full SHA
    b0f9657 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2026

  1. fix: allow zero strides on empty arrays (rust-ndarray#1611)

    Treat shapes with an empty axis as non-overlapping when validating
    mutable views.
    
    This allows zero strides on empty arrays while keeping the existing
    overlap checks for non-empty shapes.
    
    Fixes rust-ndarray#1609
    Guflly authored Oct 19, 2026
    Configuration menu
    Copy the full SHA
    34d4e13 View commit details
    Browse the repository at this point in the history
  2. feat: add Dimension::from_slice (rust-ndarray#1608)

    Add a public `from_slice` that returns `None` when the slice length does not match the type's dimensionality (`IxDyn` accepts any length). Now `from_dimension` uses `from_slice`.
    
    Closes rust-ndarray#1330
    SomeB1oody authored Oct 19, 2026
    Configuration menu
    Copy the full SHA
    4ada8b9 View commit details
    Browse the repository at this point in the history
  3. feat: update to rand 0.10 and rand_distr 0.6

    No changes needed in ndarray-rand itself.
    
    Changes in `crates/numeric-tests/tests/accuracy.rs`:
    - Import `RngExt` for `random_range`.
    - Replace the removed `SmallRng::from_os_rng` with `SmallRng::from_rng(&mut rand::rng())`.
    
    bump ndarray-rand to 0.17.0
    
    Closes rust-ndarray#1590
    SomeB1oody authored Oct 19, 2026
    Configuration menu
    Copy the full SHA
    c9fe937 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2026

  1. Configuration menu
    Copy the full SHA
    53df84a View commit details
    Browse the repository at this point in the history
Loading