|
1 | | -Version 0.17.0 (2025-10-14) |
| 1 | +Version 0.17.1 (2025-11-02) |
| 2 | +=========================== |
| 3 | +Version 0.17.1 provides a patch to fix the originally-unsound implementation of the new array reference types. |
| 4 | + |
| 5 | +The reference types are now all unsized. |
| 6 | +Practically speaking, this has one major implication: writing functions and traits that accept `RawRef` and `LayoutRef` will now need a `+ ?Sized` bound to work ergonomically with `ArrayRef`. |
| 7 | +For example, the release notes for 0.17.0 said |
| 8 | +> #### Reading / Writing Shape: `LayoutRef<A, D>` |
| 9 | +> LayoutRef lets functions view or modify shape/stride information without touching data. |
| 10 | +> This replaces verbose signatures like: |
| 11 | +> ```rust |
| 12 | +> fn alter_view<S>(a: &mut ArrayBase<S, Ix1>) |
| 13 | +> where S: Data<Elem = f64>; |
| 14 | +> ``` |
| 15 | +> Use AsRef / AsMut for best compatibility: |
| 16 | +> ```rust |
| 17 | +> fn alter_shape<T>(a: &mut T) |
| 18 | +> where T: AsMut<LayoutRef<f64>>; |
| 19 | +> ``` |
| 20 | +However, these functions now need an additional bound to allow for callers to pass in `&ArrayRef` types: |
| 21 | +```rust |
| 22 | +fn alter_shape<T>(a: &mut T) |
| 23 | +where T: AsMut<LayoutRef<f64>> + ?Sized; // Added bound here |
| 24 | +``` |
| 25 | +
|
| 26 | +A huge thank you to Sarah Quiñones ([@sarah-quinones](https://github.com/sarah-quinones)) for catching the original unsound bug and helping to fix it. |
| 27 | +She does truly excellent work with [`faer-rs`](https://codeberg.org/sarah-quinones/faer); check it out! |
| 28 | + |
| 29 | +Version 0.17.0 (2025-10-14) [YANKED] |
2 | 30 | =========================== |
3 | 31 | Version 0.17.0 introduces a new **array reference type** — the preferred way to write functions and extension traits in `ndarray`. |
4 | 32 | This release is fully backwards-compatible but represents a major usability improvement. |
|
0 commit comments