FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add .into_raw_vec_with_offset() and deprecate .into_raw_vec() by bluss · Pull Request #1379 · rust-ndarray/ndarray · GitHub

Add .into_raw_vec_with_offset() and deprecate .into_raw_vec() - #1379

Merged
bluss merged 2 commits into
masterfrom
offset-to-first-2
Apr 4, 2024
Merged

Add .into_raw_vec_with_offset() and deprecate .into_raw_vec()#1379
bluss merged 2 commits into
masterfrom
offset-to-first-2

Conversation

bluss commented Apr 1, 2024
edited
Loading

Copy link
Copy Markdown
Member

Without the offset from start of allocation to the logically first element of the array,
correctly reinterpreting the results of .into_raw_vec() as an n-D array is tricky.

Provide a smoother transition by deprecating the old method and
introducing a new one.

Return Option, this makes the empty vector case stand out
as a separate case that needs to be handled.

Closes #994 by superseding it.

Without the offset from start of allocation to the logically first
element of the array, correctly reinterpreting the results of
.into_raw_vec() as an n-D array is tricky.
bluss added this to the 0.16.0 milestone Apr 1, 2024
bluss changed the title Update into_raw_vec Add .into_raw_vec_with_offset() and deprecate .into_raw_vec() Apr 1, 2024
Comment thread src/dimension/mod.rs Outdated
Comment thread src/impl_owned_array.rs
Comment thread tests/array.rs Outdated
Comment thread src/impl_owned_array.rs
bluss force-pushed the offset-to-first-2 branch from a2b6b30 to 38b6eea Compare April 4, 2024 16:50
Provide a smoother transition by deprecating the old method and
introducing a new one.

Return Option<usize>, this makes the empty vector case stand out
as a separate case that needs to be handled.
bluss force-pushed the offset-to-first-2 branch from 38b6eea to edfbe81 Compare April 4, 2024 16:59
bluss enabled auto-merge April 4, 2024 17:00
bluss added this pull request to the merge queue Apr 4, 2024
Merged via the queue into master with commit 510d65b Apr 4, 2024

bluss commented Apr 4, 2024

Copy link
Copy Markdown
Member Author

thanks for looking at this

bluss deleted the offset-to-first-2 branch April 4, 2024 18:06
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL