-
Notifications
You must be signed in to change notification settings - Fork 11
fix(deps): update rust crate ndarray to 0.17 #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/ndarray-0.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92ae664 to
793f347
Compare
793f347 to
ad46387
Compare
3d1cc97 to
7988592
Compare
7988592 to
00cdbad
Compare
Contributor
Author
|
00cdbad to
9ca424b
Compare
7d1bf88 to
9a1f849
Compare
d8d4ec3 to
dd19f93
Compare
bc15d4f to
282090a
Compare
8d92616 to
50c5279
Compare
c868a2c to
566149c
Compare
566149c to
2fd738f
Compare
24dcb02 to
736de6d
Compare
360155b to
4f8b4bf
Compare
4f8b4bf to
8819784
Compare
8819784 to
df7e9d4
Compare
8600268 to
7af85e5
Compare
7af85e5 to
d09c42a
Compare
d09c42a to
31cceed
Compare
31cceed to
8d06c4b
Compare
8d06c4b to
f657162
Compare
f657162 to
0980bc9
Compare
0980bc9 to
3386135
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.15->0.17Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
rust-ndarray/ndarray (ndarray)
v0.17.1Compare 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 said
However, these functions now need an additional bound to allow for callers to pass in
&ArrayReftypes: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!v0.17.0Compare 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:
&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.
Background
ndarray has multiple ways to write functions that take arrays (a problem captured well in issue #1059).
For example:
All of these work, but having several equivalent forms causes confusion.
The most general solution, writing generically over storage types:
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:
(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:
Use AsRef / AsMut for best compatibility:
(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).Like
LayoutRef, it is best used viaAsRef/AsMut.Added
diffmethod for calculating the difference between elements by @johann-cm #1437partitionmethod for partially sorting an array by @NewBornRustacean #1498meshgridmethod for building regular grids of values by @akern40 #1477cumprodmethod for cumulative products by @NewBornRustacean #1491exp_m1,ln_1p,asin,acos,atan,sinh,cosh,tanh,asinh,acosh,atanh, andhypotaxis_windows_with_stridemethod for strided windows by @goertzenator #1460permute_axes) and reversing (reverse_axes) axes by @NewBornRustacean #1505into_*_iterfunctions as lifetime-preserving versions of into-iterator functionality by @akern40 #1510Changed
remove_indexcan now be called on views, in addition to owned arrays by @akern40Removed
serde-1,test, anddocsfeature flags; by @akern40 #1479approx,serde,rayoninstead ofdocs.serdeinstead ofserde-1Fixed
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 compilesDocumentation
selectby @Drazharinto_raw_vec_and_offsetby @benliepertArray::zeroswith how to control the return type by @akern40Other
no_stdby @akern40v0.16.1Compare Source
===========================
v0.16.0Compare Source
===========================
Featured Changes
.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
RawViewMut::from_shape_ptrwith a debug assertion by @bluss #1413CowArrayan owned storage array, require Clone bound forinto_sharedby @jturner314 #1028NdProducer::Dimofaxis_windows()toIx1by @jonasBoss #1305squeeze()to dynamic dimension arrays by @barakugav #1396flatten,flatten_with_orderandinto_flatto arrays by @barakugav #1397is_uniqueforArcArrayby @daniellga #1399triuandtrilmethods directly to ArrayBase by @akern40 #1386product_axisby @akern40 #1387LanesIterby @Muthsera #1237From<&[[A; N]]> for ArrayViewandFrom<&mut [[A; N]]> for ArrayViewMutby @jturner314 #1131s![]macro by @jturner314 #1196baseComputations to be Safer by @LazaroHurtado #1297Windowsby @LazaroHurtado #1249clone_from()in two places by @ChayimFriedman2 #1347Tests, CI and Maintainer tasks
Configuration
📅 Schedule: Branch creation - "after 07:00 before 20:00 every weekday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.