NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #758 most downloaded on crates.io
An n-dimensional array for general elements and for numerics. Lightweight array views and slicing; views support chunking and splitting.
Last release 9 months ago
10 Jan 2026
Release timing varies
gaps range from 1 weeks to 2.0 years
Some releases are documented
notes for 19 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
11 years old
93 releases · first in 2015
Version 0.17.2 is mainly a patch fix to bugs related to the new ArrayRef implementation.
Version 0.17.2 is mainly a patch fix to bugs related to the new ArrayRef implementation.
In addition, ndarray has reduced its packaging footprint to ease supply chain reviews (and shrink the binary size!).
A special thanks to @SwishSwushPow and @weiznich for bringing this to our attention and making the necessary changes.
One column per quarter.
Version 0.17.1 provides a patch to fix the originally-unsound implementation of the new array reference types.
Version 0.17.1 provides a patch to fix the originally-unsound implementation of the new array reference types.
The reference types are now all unsized. 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. For example, the release notes for 0.17.0 said
Reading / Writing Shape:
LayoutRef<A, D>LayoutRef lets functions view or modify shape/stride information without touching data.
This replaces verbose signatures like:fn alter_view<S>(a: &mut ArrayBase<S, Ix1>) where S: Data<Elem = f64>;Use AsRef / AsMut for best compatibility:
fn alter_shape<T>(a: &mut T) where T: AsMut<LayoutRef<f64>>;
However, these functions now need an additional bound to allow for callers to pass in &ArrayRef types:
fn alter_shape<T>(a: &mut T)
where T: AsMut<LayoutRef<f64>> + ?Sized; // Added bound hereA huge thank you to Sarah Quiñones (@sarah-quinones) for catching the original unsound bug and helping to fix it. She does truly excellent work with faer-rs; check it out!
Version 0.17.1 provides a patch to fix the originally-unsound implementation of the new array reference types.
The reference types are now all unsized.
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.
For example, the release notes for 0.17.0 said
Reading / Writing Shape:
LayoutRef<A, D>LayoutRef lets functions view or modify shape/stride information without touching data. This replaces verbose signatures like:
fn alter_view<S>(a: &mut ArrayBase<S, Ix1>) where S: Data<Elem = f64>;Use AsRef / AsMut for best compatibility:
fn alter_shape<T>(a: &mut T) where T: AsMut<LayoutRef<f64>>;
However, these functions now need an additional bound to allow for callers to pass in &ArrayRef types:
fn alter_shape<T>(a: &mut T)
where T: AsMut<LayoutRef<f64>> + ?Sized; // Added bound here
A huge thank you to Sarah Quiñones (@sarah-quinones) for catching the original unsound bug and helping to fix it.
She does truly excellent work with faer-rs; check it out!
Version 0.17.0 (2025-10-14) [YANKED]
Note: 0.17.0 was yanked due to a bug in the reference type implementation that could cause use-after-free. That bug was fixed in 0.17.1. All the changes listed here are once again available in 0.17.1, with a small caveat for the reference types. See the release notes for 0.17.1 for details.
Version 0.17.0 introduces a new array reference type — the preferred way to write functions and extension traits in ndarray. This release is fully backwards-compatible but represents a major usability improvement. The first section of this changelog explains the change in detail.
It also includes numerous new methods, math functions, and internal improvements — all credited below.
ndarray 0.17.0 adds new reference types for writing functions and traits that work seamlessly with owned arrays and views.
When writing functions that accept array arguments:
&ArrayRef<A, D> to read elements from any array.&mut ArrayRef<A, D> to modify elements.&T where T: AsRef<LayoutRef<A, D>> to inspect shape/stride only.&mut T where T: AsMut<LayoutRef<A, D>> to modify shape/stride only.All existing function signatures continue to work; these new types are fully opt-in.
ndarray has multiple ways to write functions that take arrays (a problem captured well in issue #1059). For example:
fn sum(a: ArrayView1<f64>) -> f64;
fn sum(a: &ArrayView1<f64>) -> f64;
fn sum(a: &Array1<f64>) -> f64;All of these work, but having several equivalent forms causes confusion. The most general solution, writing generically over storage types:
fn sum<S>(a: &ArrayBase<S, Ix1>) -> f64
where S: Data<Elem = f64>;is powerful but verbose and often hard to read. Version 0.17.0 introduces a new, simpler pattern that expresses the same flexibility more clearly.
Three new reference types make it easier to write functions that accept any kind of array while clearly expressing what kind of access (data or layout) they need.
ArrayRef<A, D>ArrayRef is the Deref target of ArrayBase. It behaves like &[T] for Vec<T>, giving access to elements and layout. Mutability is expressed through the reference itself (& vs &mut), not through a trait bound or the type itself. It is used as follows:
fn sum(a: &ArrayRef1<f64>) -> f64;
fn cumsum_mut(a: &mut ArrayRef1<f64>);(ArrayRef1 is available from the prelude.)
LayoutRef<A, D>LayoutRef lets functions view or modify shape/stride information without touching data. This replaces verbose signatures like:
fn alter_view<S>(a: &mut ArrayBase<S, Ix1>)
where S: Data<Elem = f64>;Use AsRef / AsMut for best compatibility:
fn alter_shape<T>(a: &mut T)
where T: AsMut<LayoutRef<f64>>;(Accepting a LayoutRef directly can cause unnecessary copies; see #1440.)
RawRef<A, D>RawRef augments RawArrayView and RawArrayViewMut for power users needing unsafe element access (e.g. uninitialized buffers). Like LayoutRef, it is best used via AsRef / AsMut.
diff method for calculating the difference between elements by @johann-cm #1437partition method for partially sorting an array by @NewBornRustacean #1498meshgrid method for building regular grids of values by @akern40 #1477cumprod method for cumulative products by @NewBornRustacean #1491exp_m1, ln_1p, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, and hypotaxis_windows_with_stride method for strided windows by @goertzenator #1460permute_axes) and reversing (reverse_axes) axes by @NewBornRustacean #1505into_*_iter functions as lifetime-preserving versions of into-iterator functionality by @akern40 #1510remove_index can now be called on views, in addition to owned arrays by @akern40serde-1, test, and docs feature flags; by @akern40 #1479
approx,serde,rayon instead of docs.serde instead of serde-1last_mut() now guarantees that the underlying data is uniquely held by @bluss #1429ArrayView is now covariant over lifetime by @akern40 #1480, so that the following code now compilesfn fn_cov<'a>(x: ArrayView1<'static, f64>) -> ArrayView1<'a, f64> {
x
}select by @Drazharinto_raw_vec_and_offset by @benliepertArray::zeros with how to control the return type by @akern40Refactor and simplify BLAS gemm call further by @bluss #1421
This release of ndarray-rand adds compatibility for the new ArrayRef type in ndarray 0.17. It adds the the new RandomRefExt trait, providing sample_ax
This release of ndarray-rand adds compatibility for the new ArrayRef type in ndarray 0.17. It adds the the new RandomRefExt trait, providing sample_axis and sample_axis_using methods on ArrayRef.
This release also bumps the requirements for rand to 0.9.0 and for rand_distr to 0.5.0.
.into_shape() is now deprecated..into_shape_with_order() or .to_shape() instead, which don't have into_shape's drawbacks.RawViewMut::from_shape_ptr with a debug assertion by @bluss #1413CowArray an owned storage array, require Clone bound for into_shared by @jturner314 #1028NdProducer::Dim of axis_windows() to Ix1 by @jonasBoss #1305squeeze() to dynamic dimension arrays by @barakugav #1396flatten, flatten_with_order and into_flat to arrays by @barakugav #1397is_unique for ArcArray by @daniellga #1399triu and tril methods directly to ArrayBase by @akern40 #1386product_axis by @akern40 #1387LanesIter by @Muthsera #1237From<&[[A; N]]> for ArrayView and From<&mut [[A; N]]> for ArrayViewMut by @jturner314 #1131s![] macro by @jturner314 #1196base Computations to be Safer by @LazaroHurtado #1297Windows by @LazaroHurtado #1249clone_from() in two places by @ChayimFriedman2 #1347Add get_ptr and get_mut_ptr methods for getting an element's pointer from an index, by [@adamreichold].
Add get_ptr and get_mut_ptr methods for getting an element's pointer from
an index, by [@adamreichold].
https://github.com/rust-ndarray/ndarray/pull/1151
Various fixes to resolve compiler and Clippy warnings/errors, by [@aganders3] and [@jturner314].
https://github.com/rust-ndarray/ndarray/pull/1171
Fix description of stack! in quick start docs, by [@jturner314]. Thanks to
[@HyeokSuLee] for pointing out the issue.
https://github.com/rust-ndarray/ndarray/pull/1156
Add MSRV to Cargo.toml.
https://github.com/rust-ndarray/ndarray/pull/1191
The s! macro now works in no_std environments, by [@makotokato].
The s! macro now works in no_std environments, by [@makotokato].
https://github.com/rust-ndarray/ndarray/pull/1154
Improve docs and fix typos, by [@steffahn] and [@Rikorose].
https://github.com/rust-ndarray/ndarray/pull/1134 <br> https://github.com/rust-ndarray/ndarray/pull/1164
Complex matrix multiplication now uses BLAS cgemm/zgemm when enabled (and matrix layout allows), by [@ethanhs].
The Dr. Turner release 🚀
Complex matrix multiplication now uses BLAS cgemm/zgemm when
enabled (and matrix layout allows), by [@ethanhs].
https://github.com/rust-ndarray/ndarray/pull/1106
Use matrixmultiply as fallback for complex matrix multiplication
when BLAS is not available or the matrix layout requires it by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/1118
Add into/to_slice_memory_order methods for views, lifetime-preserving
versions of existing similar methods by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1015
kron function for Kronecker product by [@ethanhs].
https://github.com/rust-ndarray/ndarray/pull/1105
split_complex method for splitting complex arrays into separate
real and imag view parts by [@jturner314] and [@ethanhs].
https://github.com/rust-ndarray/ndarray/pull/1107
New method try_into_owned_nocopy by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1022
New producer and iterable axis_windows by [@VasanthakumarV]
and [@jturner314].
https://github.com/rust-ndarray/ndarray/pull/1022
New method Zip::par_fold by [@adamreichold]
https://github.com/rust-ndarray/ndarray/pull/1095
New constructor from_diag_elem by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1076
Parallel::with_min_len method for parallel iterators by [@adamreichold]
https://github.com/rust-ndarray/ndarray/pull/1081
Allocation-preserving map function .mapv_into_any() added by [@benkay86]
Improve performance of .sum_axis() for some cases by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1061
Fix error in calling dgemv (matrix-vector multiplication) with BLAS and broadcasted arrays, by [@jturner314].
https://github.com/rust-ndarray/ndarray/pull/1088
Support approx 0.5 partially alongside the already existing approx 0.4 support.
New feature flag is approx-0_5, by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1025
Slice and reference-to-array conversions to CowArray added for by [@jturner314].
https://github.com/rust-ndarray/ndarray/pull/1038
Allow trailing comma in stack and concatenate macros by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1044
Zip now has a must_use marker to help users by [@adamreichold]
https://github.com/rust-ndarray/ndarray/pull/1082
Fixing the crates.io badge on github by [@atouchet]
https://github.com/rust-ndarray/ndarray/pull/1104
Use intra-doc links in docs by [@LeSeulArtichaut]
https://github.com/rust-ndarray/ndarray/pull/1033
Clippy fixes by [@adamreichold]
https://github.com/rust-ndarray/ndarray/pull/1092 <br> https://github.com/rust-ndarray/ndarray/pull/1091
Minor fixes in links and punctuation in docs by [@jimblandy]
https://github.com/rust-ndarray/ndarray/pull/1056
Minor fixes in docs by [@chohner]
https://github.com/rust-ndarray/ndarray/pull/1119
Update tests to quickcheck 1.0 by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/1114
New methods .last/_mut() for arrays and array views by [@jturner314]
New methods .last/_mut() for arrays and array views by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1013
Fix as_slice_memory_order_mut() so that it never changes strides (the
memory layout) of the array when called.
This was a bug that impacted ArcArray (and for example not Array or ArrayView/Mut),
and multiple methods on ArcArray that use as_slice_memory_order_mut (for example map_mut).
Fix by [@jturner314].
https://github.com/rust-ndarray/ndarray/pull/1019
Array1 now implements From<Box<[T]>> by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1016
ArcArray now implements From<Array<...>> by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1021
CowArray now implements RawDataSubst by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1020
Mention unsharing in .as_mut_ptr docs by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/1017
Clarify and fix minor errors in push/append method docs by [@bluss] f21c668a
Fix several warnings in doc example code by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/1009
New methods for growing/appending to owned Arrays. These methods allow building an array efficiently chunk by chunk. By [@bluss].
New methods for growing/appending to owned Arrays. These methods allow
building an array efficiently chunk by chunk. By [@bluss].
.push_row(), .push_column().push(axis, array), .append(axis, array)stack, concatenate and .select() now support all Clone-able elements
as a result.
https://github.com/rust-ndarray/ndarray/pull/932 <br> https://github.com/rust-ndarray/ndarray/pull/990
New reshaping method .to_shape(...), called with new shape and optional
ordering parameter, this is the first improvement for reshaping in terms of
added features and increased consistency, with more to come. By [@bluss].
https://github.com/rust-ndarray/ndarray/pull/982
Array now implements a by-value iterator, by [@bluss].
https://github.com/rust-ndarray/ndarray/pull/986
New methods .move_into() and .move_into_uninit() which allow assigning
into an array by moving values from an array into another, by [@bluss].
https://github.com/rust-ndarray/ndarray/pull/932 <br> https://github.com/rust-ndarray/ndarray/pull/997
New method .remove_index() for owned arrays by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/967
New constructor build_uninit which makes it easier to initialize
uninitialized arrays in a way that's generic over all owned array kinds.
By [@bluss].
https://github.com/rust-ndarray/ndarray/pull/1001
Preserve the allocation of the input array in some more cases for arithmetic ops by [@SparrowLii]
https://github.com/rust-ndarray/ndarray/pull/963
Improve broadcasting performance for &array + &array arithmetic ops by [@SparrowLii]
https://github.com/rust-ndarray/ndarray/pull/965
Fix an error in construction of empty array with negative strides, by [@jturner314].
https://github.com/rust-ndarray/ndarray/pull/998
Fix minor performance bug with loop order selection in Zip by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/977
Add dimension getters to Shape and StrideShape by [@stokhos]
https://github.com/rust-ndarray/ndarray/pull/978
Rustdoc now uses the ndarray logo that [@jturner314] created previously
https://github.com/rust-ndarray/ndarray/pull/981
Minor doc changes by [@stokhos], [@cassiersg] and [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/968 <br> https://github.com/rust-ndarray/ndarray/pull/971 <br> https://github.com/rust-ndarray/ndarray/pull/974
A little refactoring to reduce generics bloat in a few places by [@bluss].
https://github.com/rust-ndarray/ndarray/pull/1004
Arrays and views now have additional PartialEq impls so that it's possible to compare arrays with references to arrays and vice versa by [@bluss]
Arrays and views now have additional PartialEq impls so that it's possible to compare arrays with references to arrays and vice versa by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/958
Fix panic in creation of .windows() producer from negative stride array by
[@bluss]
https://github.com/rust-ndarray/ndarray/pull/957
Update BLAS documentation further by @bluss
https://github.com/rust-ndarray/ndarray/pull/955 <br> https://github.com/rust-ndarray/ndarray/pull/959
AxisDescription is now a struct with field names, not a tuple struct by [@jturner314]. Its accessor methods are now deprecated.
Support inserting new axes while slicing by [@jturner314]. This is an example:
let view = arr.slice(s![.., -1, 2..;-1, NewAxis]);
https://github.com/rust-ndarray/ndarray/pull/570
Support two-sided broadcasting in arithmetic operations with arrays by [@SparrowLii]
This now allows, for example, addition of a 3 x 1 with a 1 x 3 array; the operands are in this case broadcast to 3 x 3 which is the shape of the result.
Note that this means that a new trait bound is required in some places when mixing dimensionality types of arrays in arithmetic operations.
https://github.com/rust-ndarray/ndarray/pull/898
Support for compiling ndarray as no_std (using core and alloc) by
[@xd009642] and [@bluss]
https://github.com/rust-ndarray/ndarray/pull/861 <br> https://github.com/rust-ndarray/ndarray/pull/889
New methods .cell_view() and ArrayViewMut::into_cell_view that enable
new ways of working with array elements as if they were in Cells - setting
elements through shared views and broadcast views, by [@bluss].
https://github.com/rust-ndarray/ndarray/pull/877
New methods slice_each_axis/_mut/_inplace that make it easier to slice
a dynamic number of axes in some situations, by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/913
New method a.assign_to(b) with the inverse argument order compared to the
existing b.assign(a) and some extra features like assigning into
uninitialized arrays, By [@bluss].
https://github.com/rust-ndarray/ndarray/pull/947
New methods .std() and .var() for standard deviation and variance by
[@kdubovikov]
https://github.com/rust-ndarray/ndarray/pull/790
Ndarray can now correctly determine that arrays can be contiguous, even if they have negative strides, by [@SparrowLii]
https://github.com/rust-ndarray/ndarray/pull/885 <br> https://github.com/rust-ndarray/ndarray/pull/948
Improvements to map_inplace by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/911
.into_dimensionality performance was improved for the IxDyn to IxDyn
case by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/906
Improved performance for scalar + &array and &array + scalar operations by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/890
New constructors Array::from_iter and Array::from_vec by [@bluss].
No new functionality, just that these constructors are available without trait
imports.
https://github.com/rust-ndarray/ndarray/pull/921
NdProducer::raw_dim is now a documented method by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/918
AxisDescription is now a struct with field names, not a tuple struct by
[@jturner314]. Its accessor methods are now deprecated.
https://github.com/rust-ndarray/ndarray/pull/915
Methods for array comparison abs_diff_eq and relative_eq are now
exposed as inherent methods too (no trait import needed), still under the approx
feature flag by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/946
Changes to the slicing-related types and macro by [@jturner314] and [@bluss]:
Dimension::SliceArg associated type, and add a new SliceArg
trait for this purpose.s![] macro to an owned SliceInfo rather
than a reference.SliceOrIndex enum with SliceInfoElem, which has an
additional NewAxis variant and does not have a step_by method.SliceInfo in order to support the NewAxis
functionality and remove some tricky unsafe code.SliceInfo::new method as unsafe. The new implementations of
TryFrom can be used as a safe alternative.AsRef<SliceInfo<[SliceOrIndex], D>> for SliceInfo<T, D>
implementation. Add the similar From<&'a SliceInfo<T, Din, Dout>> for SliceInfo<&'a [SliceInfoElem], Din, Dout> conversion as an alternative.; step case in the s![] macro to error at compile
time if an unsupported type for expr is used, instead of panicking at
runtime.https://github.com/rust-ndarray/ndarray/pull/570 <br> https://github.com/rust-ndarray/ndarray/pull/940 <br> https://github.com/rust-ndarray/ndarray/pull/943 <br> https://github.com/rust-ndarray/ndarray/pull/945 <br>
Removed already deprecated methods by [@bluss]:
.all_close() - use approx feature and methods like .abs_diff_eq instead.scalar_sum() as deprecated - use .sum() insteadDataClone - use Data + RawDataClone insteadArrayView::into_slice - use to_slice() instead.https://github.com/rust-ndarray/ndarray/pull/874
Remove already deprecated methods: rows, cols (for row and column count; the new names are nrows and ncols) by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/872
Renamed Zip methods by [@bluss] and [@SparrowLii]:
apply -> for_eachapply_collect -> map_collectapply_collect_into -> map_collect_intopar_ prefixed methods renamed accordingly)https://github.com/rust-ndarray/ndarray/pull/894 <br> https://github.com/rust-ndarray/ndarray/pull/904 <br>
Deprecate Array::uninitialized and revamped its replacement by [@bluss]
Please use new new Array::uninit which is based on MaybeUninit (renamed
from Array::maybe_uninit, the old name is also deprecated).
https://github.com/rust-ndarray/ndarray/pull/902 <br> https://github.com/rust-ndarray/ndarray/pull/876
Renamed methods (old names are now deprecated) by [@bluss] and [@jturner314]
genrows/_mut -> rows/_mutgencolumns/_mut -> columns/_mutstack_new_axis -> stack (the new name already existed)visit -> for_eachhttps://github.com/rust-ndarray/ndarray/pull/872 <br> https://github.com/rust-ndarray/ndarray/pull/937 <br> https://github.com/rust-ndarray/ndarray/pull/907 <br>
Updated matrixmultiply dependency to 0.3.0 by [@bluss]
and adding new feature flag matrixmultiply-threading to enable its threading
https://github.com/rust-ndarray/ndarray/pull/888 <br> https://github.com/rust-ndarray/ndarray/pull/938 <br>
Updated num-complex dependency to 0.4.0 by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/952
Fix Zip::indexed for the 0-dimensional case by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/862
Fix bug in layout computation that broke parallel collect to f-order array in some circumstances by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/900
Fix an unwanted panic in shape overflow checking by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/855
Mark the SliceInfo::new method as unsafe due to the requirement that
indices.as_ref() always return the same value when called multiple times,
by [@bluss] and [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/570
It was changed how we integrate with BLAS and blas-src. Users of BLAS need
to read the README for the updated instructions. Ndarray itself no longer
has public dependency on blas-src. Changes by [@bluss].
https://github.com/rust-ndarray/ndarray/pull/891 <br> https://github.com/rust-ndarray/ndarray/pull/951
Various improvements to tests and CI by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/934 <br> https://github.com/rust-ndarray/ndarray/pull/924 <br>
The sort-axis.rs example file's implementation of sort was bugfixed and now
has tests, by [@dam5h] and [@bluss]
https://github.com/rust-ndarray/ndarray/pull/916 <br> https://github.com/rust-ndarray/ndarray/pull/930
We now link to the #rust-sci room on matrix in the readme by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/619
Internal cleanup with builder-like methods for creating arrays by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/908
Implementation fix of .swap(i, j) by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/903
Minimum supported Rust version (MSRV) is Rust 1.49.
https://github.com/rust-ndarray/ndarray/pull/902
Minor improvements to docs by [@insideoutclub]
https://github.com/rust-ndarray/ndarray/pull/887
This change was unfortunately done without a deprecation period, due to the long period between releases.
Zip::apply_collect and Zip::par_apply_collect now support all
elements (not just Copy elements) by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/814
https://github.com/rust-ndarray/ndarray/pull/817
New function stack by [@andrei-papou]
https://github.com/rust-ndarray/ndarray/pull/844
https://github.com/rust-ndarray/ndarray/pull/850
Handle inhomogeneous shape inputs better in Zip, in practice: guess better whether to prefer c- or f-order for the inner loop by [@bluss] https://github.com/rust-ndarray/ndarray/pull/809
Improve code sharing in some commonly used code by [@bluss] https://github.com/rust-ndarray/ndarray/pull/819
The old function stack has been renamed to concatenate.
A new function stack with numpy-like semantics have taken its place.
Old usages of stack should change to use concatenate.
concatenate produces an array with the same number of axes as the inputs.
stack produces an array that has one more axis than the inputs.
This change was unfortunately done without a deprecation period, due to the long period between releases.
https://github.com/rust-ndarray/ndarray/pull/844
https://github.com/rust-ndarray/ndarray/pull/850
Enum ErrorKind is now properly non-exhaustive and has lost its old placeholder invalid variant. By [@Zuse64] https://github.com/rust-ndarray/ndarray/pull/848
Remove deprecated items:
subview_inplace use collapse_axissubview_mut use index_axis_mutinto_subview use index_axis_movesubview use index_axisslice_inplace use slice_collapseUndeprecated remove_axis because its replacement is hard to find out on your own.
Update public external dependencies to new versions by [@Eijebong] and [@bluss]
https://github.com/rust-ndarray/ndarray/pull/810
https://github.com/rust-ndarray/ndarray/pull/851
Minor doc fixes by [@acj] https://github.com/rust-ndarray/ndarray/pull/834
Minor doc fixes by [@xd009642] https://github.com/rust-ndarray/ndarray/pull/847
The minimum required rust version is Rust 1.42.
Release management by [@bluss]
New *amazing* slicing methods multi_slice_* by [@jturner314] https://github.com/rust-ndarray/ndarray/pull/717
multi_slice_* by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/717.cast() for raw views by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/734ArcArray1, ArcArray2 by [@d-dorazio]
https://github.com/rust-ndarray/ndarray/pull/741from_shape_simple_fn by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/728Dimension::Larger now requires RemoveAxis by [@TheLortex]
https://github.com/rust-ndarray/ndarray/pull/792Array::maybe_uninit and .assume_init() by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/803zip_mut_with (and thus arithmetic ops) for f-order arrays by [@nilgoyette]
https://github.com/rust-ndarray/ndarray/pull/754fold for IndicesIter by [@jturner314]
https://github.com/rust-ndarray/ndarray/pull/733The into_slice method on ArrayView is deprecated and renamed to to_slice (#646 by [@max-sixty])
ndarray-parallel is merged into ndarray. Use the rayon feature-flag to get access to parallel iterators and
other parallelized methods.
(#563 by [@bluss])logspace and geomspace constructors
(#617 by [@JP-Ellis])ArrayBase. They can be enabled using the approx feature-flag.
(#581 by [@jturner314])mean method
(#580 by [@LukeMathWalker])Zip::all to check if all elements satisfy a predicate
(#615 by [@mneumann])RawArrayView and RawArrayViewMut types and RawData, RawDataMut, and RawDataClone traits
(#496 by [@jturner314])CowArray, Clone on write array
(#632 by [@jturner314] and [@andrei-papou])as_standard_layout to ArrayBase: it takes an array by reference and returns a CoWArray in standard layout
(#616 by [@jturner314] and [@andrei-papou])Array2::from_diag method to create 2D arrays from a diagonal
(#673 by [@rth])fold method to Zip
(#684 by [@jturner314])split_at method to AxisChunksIter/Mut
(#691 by [@jturner314])AxisChunksIter/Mut
(#639 by [@nitsky])into_scalar method to ArrayView0 and ArrayViewMut0
(#700 by [@LukeMathWalker])accumulate_axis_inplace method to ArrayBase
(#611 by [@jturner314] and [@bluss])array!, azip!, and s! macros to ndarray::prelude
(#517 by [@jturner314])matrix-multiply:v0.2
(leverage SIMD instructions on x86-64 with runtime feature detection)
(#556 by [@bluss])fold for iterators
(#574 by [@jturner314])nth_back for iterators
(#686 by [@jturner314]).map_axis/_mut won't panic on 0-length axis
(#579 by [@andrei-papou])into_slice method on ArrayView is deprecated and renamed to to_slice
(#646 by [@max-sixty])RcArray is deprecated in favour of ArcArray
(#560 by [@bluss])into_slice is renamed to to_slice. into_slice is now deprecated
(#646 by [@max-sixty])from_vec is deprecated in favour of using the From to convert a Vec into an Array
(#648 by [@max-sixty])mean_axis returns Option<A> instead of A, to avoid panicking when invoked on a 0-length axis
(#580 by [@LukeMathWalker])rustc-serialize feature-flag. serde is the recommended feature-flag for serialization
(#557 by [@bluss])rows/cols are renamed to nrows/ncols. rows/cols are now deprecated
(#701 by [@bluss])azip! macro has changed to be more similar to for loops
(#626 by [@jturner314])var_axis and std_axis, the constraints on ddof and the trait bounds on A have been made more strict
(#515 by [@jturner314])mean_axis, the constraints on A have changed
(#518 by [@jturner314])DataClone is deprecated in favor of using Data + RawDataClone
(#496 by [@jturner314])Dimension::Pattern associated type now has more trait bounds
(#634 by [@termoshtt])Axis::index() now takes self instead of &self
(#642 by [@max-sixty])Hash for Dim have changed
(#642 by [@max-sixty])do_slice
(#575 by [@jturner314])s! macro
(#714 by [@bluss] and #715 by [@jturner314])ndarray's CI pipeline (clippy, cargo fmt, etc. by [@max-sixty] and [@termoshtt])…and slice_inplace to slice_collapse (deprecating the old names, except for scalar_sum which will be in 0.13).
std_axis method for computing standard deviation by @LukeMathWalker.
product method for computing product of elements in an array by @sebasv.first and first_mut methods for getting the first element of an array.into_scalar method for converting an Array0 into its element.insert_axis_inplace and index_axis_inplace methods for inserting and
removing axes in dynamic-dimensional (IxDyn) arrays without taking ownership.stride_of method for getting the stride of an axis.ndim and zeros methods to Dimension trait.scalar_sum to sum, subview to index_axis,
subview_mut to index_axis_mut, subview_inplace to
collapse_axis, into_subview to index_axis_move, and
slice_inplace to slice_collapse (deprecating the old names,
except for scalar_sum which will be in 0.13).remove_axis and fix soundness hole when removing a zero-length axis.Clone for LanesIter.Debug, Copy, and Clone for FoldWhile.sum_axis, mean_axis, and into_owned.Debug format.merge_axes when either axis length is ≤ 1.is_standard_layout in some edge cases.
(See #543.)axis_chunks_iter and axis_chunks_iter_mut when
the stride is zero or the array element type is zero-sized by @bluss.Iterator::rfold.Add var_axis method for computing variance by @LukeMathWalker.
var_axis method for computing variance by @LukeMathWalker.
map_mut and map_axis_mut methods (mutable variants of map and map_axis) by @LukeMathWalker.i128 and u128).start..=end and ..=end).Fn to FnMut for mapv, mapv_into, map_inplace and mapv_inplace.TrustedIterator for IterMut.num-traits and num-complex to version 0.2.blas-src to version 0.2.New documentation; @jturner314 has written a large “ndarray for NumPy users” document, which we include in rustdoc. Read it here a useful quick guide
ArcArray. RcArray has become ArcArray; it is now using thread
safe reference counting just like Arc; this means that shared ownership
arrays are now Send/Sync if the corresponding element type is `Send
.permute_axes() by @jturner314Array::ones by @ehsanmok.reborrow() to ArrayView/Mut, which can be used
to shorten the lifetime of an array view; in a reference-like type this
normally happens implicitly but for technical reasons the views have
an invariant lifetime parameter.Dimension types (Ix1, Ix2, .., IxDyn) now implement Hash by @jturner314
Ix1, Ix2, .., IxDyn) now implement Hash by
@jturner314
unsafe code blocks in the s![] macro are now exempted
from the unsafe_code lint by @jturner314Remove deprecated methods (.whole_chunks(), .whole_chunks_mut(), .sum(), and .mean(); replaced by .exact_chunks(), .exact_chunks_mut(), .sum_axis(), a…
Allow combined slicing and subviews in a single operation by @jturner314 and @bluss
s![]
macro, and change the return type to
&SliceInfo<[SliceOrIndex; n], Do>.s![] macro.Si type with SliceOrIndex.Slice type that is similar to the old Si type.Add support for more index types (e.g. usize) to the s![] macro by
@jturner314
Rename .islice() to .slice_inplace() by @jturner314
Rename .isubview() to .subview_inplace() by @jturner314
Add .slice_move(), .slice_axis(), .slice_axis_mut(), and
.slice_axis_inplace() methods by @jturner314
Add Dimension::NDIM associated constant by @jturner314
Change trait bounds for arithmetic ops between an array (by value) and
a reference to an array or array view (“array1 (op) &array2”); before,
an ArrayViewMut was supported on the left hand side, now, the left
hand side must not be a view.
(#380) by @jturner314
Remove deprecated methods (.whole_chunks(), .whole_chunks_mut(),
.sum(), and .mean(); replaced by .exact_chunks(),
.exact_chunks_mut(), .sum_axis(), and .mean_axis(),
respectively) by @bluss
Updated to the latest blas (optional) dependencies. See instructions in the README.
Minimum required Rust version is 1.22.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →