ndarray
An n-dimensional array for general elements and for numerics. Lightweight array views and slicing; views support chunking and splitting.
0.17.2
113M downloads/mo
#745 most downloaded on crates.io
rust-ndarray/ndarray
What this package is like to depend on
Last release 7 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 72 stable releases
1 version withdrawn
withdrawn after publishing
11 years old
93 releases · first in 2015
3 releases in the last 12 months
see the full history below
Release timeline
93 releases · Dec 2015 to Jan 2026Releases
latest 60 of 93-
0.17.210 Jan 2026Release notes
Open source →Version 0.17.2 is mainly a patch fix to bugs related to the new
ArrayRefimplementation.In addition,
ndarrayhas 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.Added
- Add type aliases for higher-dimensional ArcArrays by @varchasgopalaswamy #1561
Fixed
- Add PartialEq implementations between ArrayRef and ArrayBase by @akern40 #1557
- Implement Sync for ArrayParts by @gaumut #1552
- Clean up clippy allows and unnecessary borrows by @RPG-Alex #1571
Documentation
- fix some typos in comments by @tinyfoolish #1547
Release notes
Open source →Version 0.17.2 is mainly a patch fix to bugs related to the new
ArrayRefimplementation.In addition,
ndarrayhas 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.Added
- Add type aliases for higher-dimensional ArcArrays by @varchasgopalaswamy #1561
Fixed
- Add PartialEq implementations between ArrayRef and ArrayBase by @akern40 #1557
- Implement Sync for ArrayParts by @gaumut #1552
Documentation
- fix some typos in comments by @tinyfoolish #1547
-
0.17.102 Nov 2025Release notes
Open source →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
RawRefandLayoutRefwill now need a+ ?Sizedbound to work ergonomically withArrayRef. For example, the release notes for 0.17.0 saidReading / 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
&ArrayReftypes: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!Release notes
Open source →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
RawRefandLayoutRefwill now need a+ ?Sizedbound to work ergonomically withArrayRef. For example, the release notes for 0.17.0 saidReading / 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
&ArrayReftypes: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! -
0.17.014 Oct 2025 withdrawnRelease notes
Open source →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.
A New Way to Write Functions
TL;DR
ndarray0.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:
- Use
&ArrayRef<A, D>to read elements from any array. - Use
&mut ArrayRef<A, D>to modify elements. - Use
&T where T: AsRef<LayoutRef<A, D>>to inspect shape/stride only. - Use
&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.
Background
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.
Solution
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.
Reading / Writing Elements:
ArrayRef<A, D>ArrayRefis theDereftarget ofArrayBase. It behaves like&[T]forVec<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.)
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>>;
(Accepting a
LayoutRefdirectly can cause unnecessary copies; see #1440.)Reading / Writing Unsafe Elements:
RawRef<A, D>RawRefaugmentsRawArrayViewandRawArrayViewMutfor power users needing unsafe element access (e.g. uninitialized buffers). LikeLayoutRef, it is best used viaAsRef/AsMut.Added
- A new "array reference" type by @akern40 #1440
- A
diffmethod for calculating the difference between elements by @johann-cm #1437 - A
partitionmethod for partially sorting an array by @NewBornRustacean #1498 - A
meshgridmethod for building regular grids of values by @akern40 #1477 - A
cumprodmethod for cumulative products by @NewBornRustacean #1491 - More element-wise math functions for floats by @Waterdragen #1507
- Additions include
exp_m1,ln_1p,asin,acos,atan,sinh,cosh,tanh,asinh,acosh,atanh, andhypot
- Additions include
- Dot product support for dynamic arrays by @NewBornRustacean #1483 and @akern40 #1494
- An
axis_windows_with_stridemethod for strided windows by @goertzenator #1460 - In-place methods for permuting (
permute_axes) and reversing (reverse_axes) axes by @NewBornRustacean #1505 - Adds
into_*_iterfunctions as lifetime-preserving versions of into-iterator functionality by @akern40 #1510
Changed
remove_indexcan now be called on views, in addition to owned arrays by @akern40
Removed
- Removed the
serde-1,test, anddocsfeature flags; by @akern40 #1479- Use
approx,serde,rayoninstead ofdocs. - Use
serdeinstead ofserde-1
- Use
Fixed
last_mut()now guarantees that the underlying data is uniquely held by @bluss #1429ArrayViewis now covariant over lifetime by @akern40 #1480, so that the following code now compiles
fn fn_cov<'a>(x: ArrayView1<'static, f64>) -> ArrayView1<'a, f64> { x }
Documentation
- Filled missing documentation and adds warn(missing_docs) by @akern40
- Fixed a typo in the documentation of
selectby @Drazhar - Fixed a typo in the documentation of
into_raw_vec_and_offsetby @benliepert - Documented
Array::zeroswith how to control the return type by @akern40
Other
Release notes
Open source →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.
A New Way to Write Functions
TL;DR
ndarray0.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:
- Use
&ArrayRef<A, D>to read elements from any array. - Use
&mut ArrayRef<A, D>to modify elements. - Use
&T where T: AsRef<LayoutRef<A, D>>to inspect shape/stride only. - Use
&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.
Background
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.
Solution
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.
Reading / Writing Elements:
ArrayRef<A, D>ArrayRefis theDereftarget ofArrayBase. It behaves like&[T]forVec<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.)
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>>;(Accepting a
LayoutRefdirectly can cause unnecessary copies; see #1440.)Reading / Writing Unsafe Elements:
RawRef<A, D>RawRefaugmentsRawArrayViewandRawArrayViewMutfor power users needing unsafe element access (e.g. uninitialized buffers). LikeLayoutRef, it is best used viaAsRef/AsMut.Added
- A new "array reference" type by @akern40 #1440
- A
diffmethod for calculating the difference between elements by @johann-cm #1437 - A
partitionmethod for partially sorting an array by @NewBornRustacean #1498 - A
meshgridmethod for building regular grids of values by @akern40 #1477 - A
cumprodmethod for cumulative products by @NewBornRustacean #1491 - More element-wise math functions for floats by @Waterdragen #1507
- Additions include
exp_m1,ln_1p,asin,acos,atan,sinh,cosh,tanh,asinh,acosh,atanh, andhypot
- Additions include
- Dot product support for dynamic arrays by @NewBornRustacean #1483 and @akern40 #1494
- An
axis_windows_with_stridemethod for strided windows by @goertzenator #1460 - In-place methods for permuting (
permute_axes) and reversing (reverse_axes) axes by @NewBornRustacean #1505 - Adds
into_*_iterfunctions as lifetime-preserving versions of into-iterator functionality by @akern40 #1510
Changed
remove_indexcan now be called on views, in addition to owned arrays by @akern40
Removed
- Removed the
serde-1,test, anddocsfeature flags; by @akern40 #1479- Use
approx,serde,rayoninstead ofdocs. - Use
serdeinstead ofserde-1
- Use
Fixed
last_mut()now guarantees that the underlying data is uniquely held by @bluss #1429ArrayViewis now covariant over lifetime by @akern40 #1480, so that the following code now compiles
fn fn_cov<'a>(x: ArrayView1<'static, f64>) -> ArrayView1<'a, f64> { x }Documentation
- Filled missing documentation and adds warn(missing_docs) by @akern40
- Fixed a typo in the documentation of
selectby @Drazhar - Fixed a typo in the documentation of
into_raw_vec_and_offsetby @benliepert - Documented
Array::zeroswith how to control the return type by @akern40
Other
- Use
-
0.16.114 Aug 2024Release notes
Open source →Version 0.16.1 (2024-08-14)
- Refactor and simplify BLAS gemm call further by @bluss #1421
- Fix infinite recursion and off-by-one error in triu/tril by @akern40 #1418
- Fix using BLAS for all compatible cases of memory layout by @bluss #1419
- Use PR check instead of Merge Queue, and check rustdoc by @bluss #1420
- Make iterators covariant in element type by @bluss #1417
Release notes
Open source →- Refactor and simplify BLAS gemm call further by @bluss #1421
- Fix infinite recursion and off-by-one error in triu/tril by @akern40 #1418
- Fix using BLAS for all compatible cases of memory layout by @bluss #1419
- Use PR check instead of Merge Queue, and check rustdoc by @bluss #1420
- Make iterators covariant in element type by @bluss #1417
-
0.16.003 Aug 2024Release notes
Open source →This release of
ndarray-randadds compatibility for the newArrayReftype inndarray0.17. It adds the the newRandomRefExttrait, providingsample_axisandsample_axis_usingmethods onArrayRef.This release also bumps the requirements for
randto 0.9.0 and forrand_distrto 0.5.0.Release notes
Open source →Version 0.16.0 (2024-08-03)
Featured Changes
- Better shape: Deprecate reshape, into_shape by @bluss #1310
.into_shape()is now deprecated.
Use.into_shape_with_order()or.to_shape()instead, which don't haveinto_shape's drawbacks.
New Features and Improvements
- Check for aliasing in
RawViewMut::from_shape_ptrwith a debug assertion by @bluss #1413 - Allow aliasing in ArrayView::from_shape by @bluss #1410
- Remove deprecations from 0.15.x by @bluss #1409
- Make
CowArrayan owned storage array, require Clone bound forinto_sharedby @jturner314 #1028 - Change
NdProducer::Dimofaxis_windows()toIx1by @jonasBoss #1305 - Add
squeeze()to dynamic dimension arrays by @barakugav #1396 - Add
flatten,flatten_with_orderandinto_flatto arrays by @barakugav #1397 - Make compatible with thumbv6m-none-eabi by @BjornTheProgrammer #1384
is_uniqueforArcArrayby @daniellga #1399- Add
triuandtrilmethods directly to ArrayBase by @akern40 #1386 - Fix styling of the BLAS integration heading. by @adamreichold #1390
- Implement
product_axisby @akern40 #1387 - Add reserve method for owned arrays by @ssande7 #1268
- Use inline on spit_at and smaller methods by @bluss #1381
- Update to Approx 0.5 by @bluss #1380
- Add .into_raw_vec_with_offset() and deprecate .into_raw_vec() by @bluss #1379
- Add additional array -> array view conversions by @bluss #1130
- implement DoubleEndedIterator for 1d
LanesIterby @Muthsera #1237 - Add Zip::any by @nilgoyette #1228
- Make the aview0, aview1, and aview2 free functions be const fns by @jturner314 #1132
- Add missing safety checks to
From<&[[A; N]]> for ArrayViewandFrom<&mut [[A; N]]> for ArrayViewMutby @jturner314 #1131 - derived Debug for Iter and IterMut by @biskwikman #1353
- Fix Miri errors for WindowsIter and ExactChunksIter/Mut by @jturner314 #1142
- Fix Miri failure with -Zmiri-tag-raw-pointers by @jturner314 #1138
- Track-caller panics by @xd009642 #975
- Add slice_axis_move method by @jturner314 #1211
- iterators: Re-export IntoIter by @bluss #1370
- Fix unsafe blocks in
s![]macro by @jturner314 #1196 - Fix comparison with NumPy of slicing with negative step by @venkat0791 #1319
- Updated Windows
baseComputations to be Safer by @LazaroHurtado #1297 - Update README-quick-start.md by @fumseckk #1246
- Added stride support to
Windowsby @LazaroHurtado #1249 - Added select example to numpy user docs by @WillAyd #1294
- Add both approx features to the readme by @nilgoyette #1289
- Add NumPy examples combining slicing and assignment by @jturner314 #1210
- Fix contig check for single element arrays by @bluss #1362
- Export Linspace and Logspace iterators by @johann-cm #1348
- Use
clone_from()in two places by @ChayimFriedman2 #1347 - Update README-quick-start.md by @joelchen #1344
- Provide element-wise math functions for floats by @KmolYuan #1042
- Improve example in doc for columns method by @gkobeaga #1221
- Fix description of stack! in quick start by @jturner314 #1156
Tests, CI and Maintainer tasks
- CI: require rustfmt, nostd by @bluss #1411
- Prepare changelog for 0.16.0 by @bluss #1401
- Organize dependencies with workspace = true (cont.) by @bluss #1407
- Update to use dep: for features by @bluss #1406
- Organize the workspace of test crates a bit better by @bluss #1405
- Add rustfmt commit to ignored revisions for git blame by @lucascolley #1376
- The minimum amount of work required to fix our CI by @adamreichold #1388
- Fixed broke continuous integration badge by @juhotuho10 #1382
- Use mold linker to speed up ci by @bluss #1378
- Add rustformat config and CI by @bluss #1375
- Add docs to CI by @jturner314 #925
- Test using cargo-careful by @bluss #1371
- Further ci updates - numeric tests, and run all tests on PRs by @bluss #1369
- Setup ci so that most checks run in merge queue only by @bluss #1368
- Use merge queue by @bluss #1367
- Try to make the master branch shipshape by @adamreichold #1286
- Update ci - run cross tests only on master by @bluss #1366
- ndarray_for_numpy_users some example to code not pointed out to clippy by @higumachan #1360
- Fix minimum rust version mismatch in lib.rs by @HoKim98 #1352
- Fix MSRV build by pinning crossbeam crates. by @adamreichold #1345
- Fix new rustc lints to make the CI pass. by @adamreichold #1337
- Make Clippy happy and fix MSRV build by @adamreichold #1320
- small formatting fix in README.rst by @podusowski #1199
- Fix CI failures (mostly linting with clippy) by @aganders3 #1171
- Remove doc(hidden) attr from items in trait impls by @jturner314 #1165
Release notes
Open source →Featured Changes
- Better shape: Deprecate reshape, into_shape by @bluss #1310<br>
.into_shape()is now deprecated. Use.into_shape_with_order()or.to_shape()instead, which don't haveinto_shape's drawbacks.
New Features and Improvements
- Check for aliasing in
RawViewMut::from_shape_ptrwith a debug assertion by @bluss #1413 - Allow aliasing in ArrayView::from_shape by @bluss #1410
- Remove deprecations from 0.15.x by @bluss #1409
- Make
CowArrayan owned storage array, require Clone bound forinto_sharedby @jturner314 #1028 - Change
NdProducer::Dimofaxis_windows()toIx1by @jonasBoss #1305 - Add
squeeze()to dynamic dimension arrays by @barakugav #1396 - Add
flatten,flatten_with_orderandinto_flatto arrays by @barakugav #1397 - Make compatible with thumbv6m-none-eabi by @BjornTheProgrammer #1384
is_uniqueforArcArrayby @daniellga #1399- Add
triuandtrilmethods directly to ArrayBase by @akern40 #1386 - Fix styling of the BLAS integration heading. by @adamreichold #1390
- Implement
product_axisby @akern40 #1387 - Add reserve method for owned arrays by @ssande7 #1268
- Use inline on spit_at and smaller methods by @bluss #1381
- Update to Approx 0.5 by @bluss #1380
- Add .into_raw_vec_with_offset() and deprecate .into_raw_vec() by @bluss #1379
- Add additional array -> array view conversions by @bluss #1130
- implement DoubleEndedIterator for 1d
LanesIterby @Muthsera #1237 - Add Zip::any by @nilgoyette #1228
- Make the aview0, aview1, and aview2 free functions be const fns by @jturner314 #1132
- Add missing safety checks to
From<&[[A; N]]> for ArrayViewandFrom<&mut [[A; N]]> for ArrayViewMutby @jturner314 #1131 - derived Debug for Iter and IterMut by @biskwikman #1353
- Fix Miri errors for WindowsIter and ExactChunksIter/Mut by @jturner314 #1142
- Fix Miri failure with -Zmiri-tag-raw-pointers by @jturner314 #1138
- Track-caller panics by @xd009642 #975
- Add slice_axis_move method by @jturner314 #1211
- iterators: Re-export IntoIter by @bluss #1370
- Fix unsafe blocks in
s![]macro by @jturner314 #1196 - Fix comparison with NumPy of slicing with negative step by @venkat0791 #1319
- Updated Windows
baseComputations to be Safer by @LazaroHurtado #1297 - Update README-quick-start.md by @fumseckk #1246
- Added stride support to
Windowsby @LazaroHurtado #1249 - Added select example to numpy user docs by @WillAyd #1294
- Add both approx features to the readme by @nilgoyette #1289
- Add NumPy examples combining slicing and assignment by @jturner314 #1210
- Fix contig check for single element arrays by @bluss #1362
- Export Linspace and Logspace iterators by @johann-cm #1348
- Use
clone_from()in two places by @ChayimFriedman2 #1347 - Update README-quick-start.md by @joelchen #1344
- Provide element-wise math functions for floats by @KmolYuan #1042
- Improve example in doc for columns method by @gkobeaga #1221
- Fix description of stack! in quick start by @jturner314 #1156
Tests, CI and Maintainer tasks
- CI: require rustfmt, nostd by @bluss #1411
- Prepare changelog for 0.16.0 by @bluss #1401
- Organize dependencies with workspace = true (cont.) by @bluss #1407
- Update to use dep: for features by @bluss #1406
- Organize the workspace of test crates a bit better by @bluss #1405
- Add rustfmt commit to ignored revisions for git blame by @lucascolley #1376
- The minimum amount of work required to fix our CI by @adamreichold #1388
- Fixed broke continuous integration badge by @juhotuho10 #1382
- Use mold linker to speed up ci by @bluss #1378
- Add rustformat config and CI by @bluss #1375
- Add docs to CI by @jturner314 #925
- Test using cargo-careful by @bluss #1371
- Further ci updates - numeric tests, and run all tests on PRs by @bluss #1369
- Setup ci so that most checks run in merge queue only by @bluss #1368
- Use merge queue by @bluss #1367
- Try to make the master branch shipshape by @adamreichold #1286
- Update ci - run cross tests only on master by @bluss #1366
- ndarray_for_numpy_users some example to code not pointed out to clippy by @higumachan #1360
- Fix minimum rust version mismatch in lib.rs by @HoKim98 #1352
- Fix MSRV build by pinning crossbeam crates. by @adamreichold #1345
- Fix new rustc lints to make the CI pass. by @adamreichold #1337
- Make Clippy happy and fix MSRV build by @adamreichold #1320
- small formatting fix in README.rst by @podusowski #1199
- Fix CI failures (mostly linting with clippy) by @aganders3 #1171
- Remove doc(hidden) attr from items in trait impls by @jturner314 #1165
- Better shape: Deprecate reshape, into_shape by @bluss #1310
-
0.15.630 Jul 2022Release notes
Open source →New features
-
Add
get_ptrandget_mut_ptrmethods for getting an element's pointer from an index, by [@adamreichold].https://github.com/rust-ndarray/ndarray/pull/1151
Other changes
-
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
-
-
0.15.530 Jul 2022Release notes
Open source →Enhancements
-
The
s!macro now works inno_stdenvironments, by [@makotokato].https://github.com/rust-ndarray/ndarray/pull/1154
Other changes
-
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
-
-
0.15.423 Nov 2021Release notes
Open source →The Dr. Turner release 🚀
New features
-
Complex matrix multiplication now uses BLAS
cgemm/zgemmwhen enabled (and matrix layout allows), by [@ethanhs].https://github.com/rust-ndarray/ndarray/pull/1106
-
Use
matrixmultiplyas 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_ordermethods for views, lifetime-preserving versions of existing similar methods by [@jturner314]https://github.com/rust-ndarray/ndarray/pull/1015
-
kronfunction for Kronecker product by [@ethanhs].https://github.com/rust-ndarray/ndarray/pull/1105
-
split_complexmethod 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_nocopyby [@jturner314]https://github.com/rust-ndarray/ndarray/pull/1022
-
New producer and iterable
axis_windowsby [@VasanthakumarV] and [@jturner314].https://github.com/rust-ndarray/ndarray/pull/1022
-
New method
Zip::par_foldby [@adamreichold]https://github.com/rust-ndarray/ndarray/pull/1095
-
New constructor
from_diag_elemby [@jturner314]https://github.com/rust-ndarray/ndarray/pull/1076
-
Parallel::with_min_lenmethod for parallel iterators by [@adamreichold]https://github.com/rust-ndarray/ndarray/pull/1081
-
Allocation-preserving map function
.mapv_into_any()added by [@benkay86]
Enhancements
-
Improve performance of
.sum_axis()for some cases by [@jturner314]https://github.com/rust-ndarray/ndarray/pull/1061
Bug fixes
-
Fix error in calling dgemv (matrix-vector multiplication) with BLAS and broadcasted arrays, by [@jturner314].
https://github.com/rust-ndarray/ndarray/pull/1088
API changes
-
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
-
Zipnow has amust_usemarker to help users by [@adamreichold]https://github.com/rust-ndarray/ndarray/pull/1082
Other changes
-
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
-
-
0.15.305 Jun 2021Release notes
Open source →New features
-
New methods
.last/_mut()for arrays and array views by [@jturner314]https://github.com/rust-ndarray/ndarray/pull/1013
Bug fixes
-
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 notArrayorArrayView/Mut), and multiple methods onArcArraythat useas_slice_memory_order_mut(for examplemap_mut). Fix by [@jturner314].https://github.com/rust-ndarray/ndarray/pull/1019
API changes
-
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
Other changes
-
Mention unsharing in
.as_mut_ptrdocs 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
-
-
0.15.217 May 2021Release notes
Open source →New features
-
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,concatenateand.select()now support allClone-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
-
Arraynow 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_uninitwhich 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
Enhancements
-
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
Bug fixes
-
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
API changes
-
Add dimension getters to
ShapeandStrideShapeby [@stokhos]https://github.com/rust-ndarray/ndarray/pull/978
Other changes
-
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
-
-
0.15.129 Mar 2021Release notes
Open source →Enhancements
-
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
Bug fixes
-
Fix panic in creation of
.windows()producer from negative stride array by [@bluss]https://github.com/rust-ndarray/ndarray/pull/957
Other changes
-
Update BLAS documentation further by @bluss
https://github.com/rust-ndarray/ndarray/pull/955 <br> https://github.com/rust-ndarray/ndarray/pull/959
-
-
0.15.025 Mar 2021Release notes
Open source →New features
-
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()andArrayViewMut::into_cell_viewthat 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/_inplacethat 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 existingb.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
Enhancements
-
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_inplaceby [@jturner314]https://github.com/rust-ndarray/ndarray/pull/911
-
.into_dimensionalityperformance was improved for theIxDyntoIxDyncase 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
API changes
-
New constructors
Array::from_iterandArray::from_vecby [@bluss]. No new functionality, just that these constructors are available without trait imports.https://github.com/rust-ndarray/ndarray/pull/921
-
NdProducer::raw_dimis now a documented method by [@jturner314]https://github.com/rust-ndarray/ndarray/pull/918
-
AxisDescriptionis 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_eqandrelative_eqare 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]:
- Remove the
Dimension::SliceArgassociated type, and add a newSliceArgtrait for this purpose. - Change the return type of the
s![]macro to an ownedSliceInforather than a reference. - Replace the
SliceOrIndexenum withSliceInfoElem, which has an additionalNewAxisvariant and does not have astep_bymethod. - Change the type parameters of
SliceInfoin order to support theNewAxisfunctionality and remove some trickyunsafecode. - Mark the
SliceInfo::newmethod asunsafe. The new implementations ofTryFromcan be used as a safe alternative. - Remove the
AsRef<SliceInfo<[SliceOrIndex], D>> for SliceInfo<T, D>implementation. Add the similarFrom<&'a SliceInfo<T, Din, Dout>> for SliceInfo<&'a [SliceInfoElem], Din, Dout>conversion as an alternative. - Change the expr
;step case in thes![]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>
- Remove the
-
Removed already deprecated methods by [@bluss]:
- Remove deprecated
.all_close()- use approx feature and methods like.abs_diff_eqinstead - Mark
.scalar_sum()as deprecated - use.sum()instead - Remove deprecated
DataClone- useData + RawDataCloneinstead - Remove deprecated
ArrayView::into_slice- useto_slice()instead.
https://github.com/rust-ndarray/ndarray/pull/874
- Remove deprecated
-
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
Zipmethods by [@bluss] and [@SparrowLii]:apply->for_eachapply_collect->map_collectapply_collect_into->map_collect_into- (
par_prefixed methods renamed accordingly)
https://github.com/rust-ndarray/ndarray/pull/894 <br> https://github.com/rust-ndarray/ndarray/pull/904 <br>
-
Deprecate
Array::uninitializedand revamped its replacement by [@bluss]Please use new new
Array::uninitwhich is based onMaybeUninit(renamed fromArray::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_each
https://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
matrixmultiplydependency to 0.3.0 by [@bluss] and adding new feature flagmatrixmultiply-threadingto enable its threadinghttps://github.com/rust-ndarray/ndarray/pull/888 <br> https://github.com/rust-ndarray/ndarray/pull/938 <br>
-
Updated
num-complexdependency to 0.4.0 by [@bluss]https://github.com/rust-ndarray/ndarray/pull/952
Bug fixes
-
Fix
Zip::indexedfor 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::newmethod asunsafedue to the requirement thatindices.as_ref()always return the same value when called multiple times, by [@bluss] and [@jturner314]https://github.com/rust-ndarray/ndarray/pull/570
Other changes
-
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 onblas-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.rsexample 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
-
-
0.14.028 Nov 2020Release notes
Open source →New features
-
Zip::apply_collectandZip::par_apply_collectnow support all elements (not justCopyelements) by [@bluss] https://github.com/rust-ndarray/ndarray/pull/814
https://github.com/rust-ndarray/ndarray/pull/817 -
New function
stackby [@andrei-papou]
https://github.com/rust-ndarray/ndarray/pull/844
https://github.com/rust-ndarray/ndarray/pull/850
Enhancements
-
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
API changes
-
The old function
stackhas been renamed toconcatenate. A new functionstackwith numpy-like semantics have taken its place. Old usages ofstackshould change to useconcatenate.concatenateproduces an array with the same number of axes as the inputs.
stackproduces 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:
- RcArray (deprecated alias for ArcArray)
- Removed
subview_inplaceusecollapse_axis - Removed
subview_mutuseindex_axis_mut - Removed
into_subviewuseindex_axis_move - Removed
subviewuseindex_axis - Removed
slice_inplaceuseslice_collapse
-
Undeprecated
remove_axisbecause its replacement is hard to find out on your own. -
Update public external dependencies to new versions by [@Eijebong] and [@bluss]
- num-complex 0.3
- approx 0.4 (optional)
- blas-src 0.6.1 and openblas-src 0.9.0 (optional)
https://github.com/rust-ndarray/ndarray/pull/810
https://github.com/rust-ndarray/ndarray/pull/851
Other changes
-
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]
-
-
0.13.121 Apr 2020Release notes
Open source →New features
- New amazing slicing methods
multi_slice_*by [@jturner314] https://github.com/rust-ndarray/ndarray/pull/717 - New method
.cast()for raw views by [@bluss] https://github.com/rust-ndarray/ndarray/pull/734 - New aliases
ArcArray1,ArcArray2by [@d-dorazio] https://github.com/rust-ndarray/ndarray/pull/741 - New array constructor
from_shape_simple_fnby [@bluss] https://github.com/rust-ndarray/ndarray/pull/728 Dimension::Largernow requiresRemoveAxisby [@TheLortex] https://github.com/rust-ndarray/ndarray/pull/792- New methods for collecting Zip into an array by [@bluss] https://github.com/rust-ndarray/ndarray/pull/797
- New
Array::maybe_uninitand.assume_init()by [@bluss] https://github.com/rust-ndarray/ndarray/pull/803
Enhancements
- Remove itertools as dependency by [@bluss] https://github.com/rust-ndarray/ndarray/pull/730
- Improve
zip_mut_with(and thus arithmetic ops) for f-order arrays by [@nilgoyette] https://github.com/rust-ndarray/ndarray/pull/754 - Implement
foldforIndicesIterby [@jturner314] https://github.com/rust-ndarray/ndarray/pull/733 - New Quick Start readme by [@lifuyang] https://github.com/rust-ndarray/ndarray/pull/785
API changes
- Remove alignment restriction on raw views by [@jturner314] https://github.com/rust-ndarray/ndarray/pull/738
Other changes
- Fix documentation in ndarray for numpy users by [@jturner314]
- Improve blas version documentation by [@jturner314]
- Doc improvements by [@mockersf] https://github.com/rust-ndarray/ndarray/pull/751
- Doc and lint related improvements by [@viniciusd] https://github.com/rust-ndarray/ndarray/pull/750
- Minor fixes related to best practices for unsafe code by [@bluss] https://github.com/rust-ndarray/ndarray/pull/799 https://github.com/rust-ndarray/ndarray/pull/802
- Release management by [@bluss]
- New amazing slicing methods
-
0.13.023 Sep 2019Release notes
Open source →New features
ndarray-parallelis merged intondarray. Use therayonfeature-flag to get access to parallel iterators and other parallelized methods. (#563 by [@bluss])- Add
logspaceandgeomspaceconstructors (#617 by [@JP-Ellis]) - Implement approx traits for
ArrayBase. They can be enabled using theapproxfeature-flag. (#581 by [@jturner314]) - Add
meanmethod (#580 by [@LukeMathWalker]) - Add
Zip::allto check if all elements satisfy a predicate (#615 by [@mneumann]) - Add
RawArrayViewandRawArrayViewMuttypes andRawData,RawDataMut, andRawDataClonetraits (#496 by [@jturner314]) - Add
CowArray,Cloneonwritearray (#632 by [@jturner314] and [@andrei-papou]) - Add
as_standard_layouttoArrayBase: it takes an array by reference and returns aCoWArrayin standard layout (#616 by [@jturner314] and [@andrei-papou]) - Add
Array2::from_diagmethod to create 2D arrays from a diagonal (#673 by [@rth]) - Add
foldmethod toZip(#684 by [@jturner314]) - Add
split_atmethod toAxisChunksIter/Mut(#691 by [@jturner314]) - Implement parallel iteration for
AxisChunksIter/Mut(#639 by [@nitsky]) - Add
into_scalarmethod toArrayView0andArrayViewMut0(#700 by [@LukeMathWalker]) - Add
accumulate_axis_inplacemethod toArrayBase(#611 by [@jturner314] and [@bluss]) - Add the
array!,azip!, ands!macros tondarray::prelude(#517 by [@jturner314])
Enhancements
- Improve performance for matrix multiplications when using the pure-Rust backend thanks to
matrix-multiply:v0.2(leverage SIMD instructions on x86-64 with runtime feature detection) (#556 by [@bluss]) - Improve performance of
foldfor iterators (#574 by [@jturner314]) - Improve performance of
nth_backfor iterators (#686 by [@jturner314]) - Improve performance of iterators for 1-d arrays (#614 by [@andrei-papou])
- Improve formatting for large arrays (#606 by [@andrei-papou] and [@LukeMathWalker], #633 and #707 by [@jturner314], and #713 by [@bluss])
- Arithmetic operations between arrays with different element types are now allowed when there is a scalar equivalent (#588 by [@jturner314])
.map_axis/_mutwon't panic on 0-lengthaxis(#579 by [@andrei-papou])- Various documentation improvements (by [@jturner314], [@JP-Ellis], [@LukeMathWalker], [@bluss])
API changes
- The
into_slicemethod on ArrayView is deprecated and renamed toto_slice(#646 by [@max-sixty]) RcArrayis deprecated in favour ofArcArray(#560 by [@bluss])into_sliceis renamed toto_slice.into_sliceis now deprecated (#646 by [@max-sixty])from_vecis deprecated in favour of using theFromto convert aVecinto anArray(#648 by [@max-sixty])mean_axisreturnsOption<A>instead ofA, to avoid panicking when invoked on a 0-length axis (#580 by [@LukeMathWalker])- Remove
rustc-serializefeature-flag.serdeis the recommended feature-flag for serialization (#557 by [@bluss]) rows/colsare renamed tonrows/ncols.rows/colsare now deprecated (#701 by [@bluss])- The usage of the
azip!macro has changed to be more similar toforloops (#626 by [@jturner314]) - For
var_axisandstd_axis, the constraints onddofand the trait bounds onAhave been made more strict (#515 by [@jturner314]) - For
mean_axis, the constraints onAhave changed (#518 by [@jturner314]) DataCloneis deprecated in favor of usingData + RawDataClone(#496 by [@jturner314])- The
Dimension::Patternassociated type now has more trait bounds (#634 by [@termoshtt]) Axis::index()now takesselfinstead of&self(#642 by [@max-sixty])- The bounds on the implementation of
HashforDimhave changed (#642 by [@max-sixty])
Bug fixes
- Prevent overflow when computing strides in
do_slice(#575 by [@jturner314]) - Fix issue with BLAS matrix-vector multiplication for array with only 1 non-trivial dimension (#585 by [@sebasv])
- Fix offset computation to avoid UB/panic when slicing in some edge cases (#636 by [@jturner314])
- Fix issues with axis iterators (#669 by [@jturner314])
- Fix handling of empty input to
s!macro (#714 by [@bluss] and #715 by [@jturner314])
Other changes
- Various improvements to
ndarray's CI pipeline (clippy,cargo fmt, etc. by [@max-sixty] and [@termoshtt]) - Bump minimum required Rust version to 1.37.
-
0.12.121 Nov 2018Release notes
Open source →- Add
std_axismethod for computing standard deviation by @LukeMathWalker.- Add
productmethod for computing product of elements in an array by @sebasv. - Add
firstandfirst_mutmethods for getting the first element of an array. - Add
into_scalarmethod for converting anArray0into its element. - Add
insert_axis_inplaceandindex_axis_inplacemethods for inserting and removing axes in dynamic-dimensional (IxDyn) arrays without taking ownership. - Add
stride_ofmethod for getting the stride of an axis. - Add public
ndimandzerosmethods toDimensiontrait. - Rename
scalar_sumtosum,subviewtoindex_axis,subview_muttoindex_axis_mut,subview_inplacetocollapse_axis,into_subviewtoindex_axis_move, andslice_inplacetoslice_collapse(deprecating the old names, except forscalar_sumwhich will be in 0.13). - Deprecate
remove_axisand fix soundness hole when removing a zero-length axis. - Implement
CloneforLanesIter. - Implement
Debug,Copy, andCloneforFoldWhile. - Relax constraints on
sum_axis,mean_axis, andinto_owned. - Add number of dimensions (and whether it's const or dynamic) to array
Debugformat. - Allow merging axes with
merge_axeswhen either axis length is ≤ 1. - Clarify and check more precise safety requirements for constructing arrays. This fixes undefined behavior in some edge cases. (See #543.)
- Fix
is_standard_layoutin some edge cases. (See #543.) - Fix chunk sizes in
axis_chunks_iterandaxis_chunks_iter_mutwhen the stride is zero or the array element type is zero-sized by @bluss. - Improve documentation by @jturner314, @bluss, and @paulkernfeld.
- Improve element iterators with implementations of
Iterator::rfold. - Miscellaneous internal implementation improvements by @jturner314 and @bluss.
- Add
- Add
-
0.12.001 Sep 2018Release notes
Open source →- Add
var_axismethod for computing variance by @LukeMathWalker.- Add
map_mutandmap_axis_mutmethods (mutable variants ofmapandmap_axis) by @LukeMathWalker. - Add support for 128-bit integer scalars (
i128andu128). - Add support for slicing with inclusive ranges (
start..=endand..=end). - Relax constraint on closure from
FntoFnMutformapv,mapv_into,map_inplaceandmapv_inplace. - Implement
TrustedIteratorforIterMut. - Bump
num-traitsandnum-complexto version0.2. - Bump
blas-srcto version0.2. - Bump minimum required Rust version to 1.27.
- Additional contributors to this release: @ExpHP, @jturner314, @alexbool, @messense, @danmack, @nbro
- Add
- Add
-
0.11.221 Mar 2018Release notes
Open source →- New documentation; @jturner314 has written a large “ndarray for NumPy users”
document, which we include in rustdoc.
Read it here
a useful quick guide for any user, and in particular if you are familiar
with numpy.
- Add
ArcArray.RcArrayhas becomeArcArray; it is now using thread safe reference counting just likeArc; this means that shared ownership arrays are nowSend/Syncif the corresponding element type is `Send- Sync`.
- Add array method
.permute_axes()by @jturner314 - Add array constructor
Array::onesby @ehsanmok - Add the method
.reborrow()toArrayView/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. - Fix an issue with type inference, the dimensionality of an array should not infer correctly in more cases when using slicing. By @jturner314.
- Add
- New documentation; @jturner314 has written a large “ndarray for NumPy users”
document, which we include in rustdoc.
Read it here
a useful quick guide for any user, and in particular if you are familiar
with numpy.
-
0.11.121 Jan 2018Release notes
Open source →- Dimension types (
Ix1, Ix2, .., IxDyn) now implementHashby @jturner314- Blas integration can now use gemv for matrix-vector multiplication also when the matrix is f-order by @maciejkula
- Encapsulated
unsafecode blocks in thes![]macro are now exempted from theunsafe_codelint by @jturner314
- Dimension types (
-
0.11.029 Dec 2017Release notes
Open source →-
Allow combined slicing and subviews in a single operation by @jturner314 and @bluss
- Add support for individual indices (to indicate subviews) to the
s![]macro, and change the return type to&SliceInfo<[SliceOrIndex; n], Do>. - Change the argument type of the slicing methods to correspond to the new
s![]macro. - Replace the
Sitype withSliceOrIndex. - Add a new
Slicetype that is similar to the oldSitype.
- Add support for individual indices (to indicate subviews) to the
-
Add support for more index types (e.g.
usize) to thes![]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::NDIMassociated 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
ArrayViewMutwas 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.
-
-
0.10.1428 Dec 2017Nothing published for this version
-
0.10.1316 Nov 2017Nothing published for this version
-
0.10.1218 Oct 2017Nothing published for this version
-
0.10.1111 Oct 2017Nothing published for this version
-
0.10.1001 Oct 2017Nothing published for this version
-
0.10.928 Sep 2017Nothing published for this version
-
0.10.823 Sep 2017Nothing published for this version
-
0.10.721 Sep 2017Nothing published for this version
-
0.10.609 Sep 2017Nothing published for this version
-
0.10.527 Aug 2017Nothing published for this version
-
0.10.419 Aug 2017Nothing published for this version
-
0.10.313 Aug 2017Nothing published for this version
-
0.10.213 Aug 2017Nothing published for this version
-
0.10.106 Aug 2017Nothing published for this version
-
0.10.017 Jul 2017Nothing published for this version
-
0.9.113 Apr 2017Nothing published for this version
-
0.9.009 Apr 2017Nothing published for this version
-
0.9.0-alpha.106 Apr 2017 pre-releaseNothing published for this version
-
0.8.404 Apr 2017Nothing published for this version
-
0.8.302 Apr 2017Nothing published for this version
-
0.8.231 Mar 2017Nothing published for this version
-
0.8.128 Mar 2017Nothing published for this version
-
0.8.002 Mar 2017Nothing published for this version
-
0.7.329 Jan 2017Nothing published for this version
-
0.7.224 Dec 2016Nothing published for this version
-
0.7.125 Nov 2016Nothing published for this version
-
0.7.021 Nov 2016Nothing published for this version
-
0.7.0-alpha.119 Nov 2016 pre-releaseNothing published for this version
-
0.7.0-alpha.018 Nov 2016 pre-releaseNothing published for this version
-
0.6.1025 Nov 2016Nothing published for this version
-
0.6.911 Nov 2016Nothing published for this version
-
0.6.823 Oct 2016Nothing published for this version
-
0.6.721 Oct 2016Nothing published for this version
-
0.6.620 Oct 2016Nothing published for this version
-
0.6.526 Sep 2016Nothing published for this version
-
0.6.422 Sep 2016Nothing published for this version
-
0.6.315 Sep 2016Nothing published for this version
-
0.6.214 Aug 2016Nothing published for this version
-
0.6.104 Aug 2016Nothing published for this version
-
0.6.006 Jun 2016Nothing published for this version