Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 27, 2020

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Jan 27, 2020
@pull pull bot added the merge-conflict Resolve conflicts manually label Feb 19, 2020
KmolYuan and others added 28 commits December 5, 2023 21:11
In `fill()` and in `assign()`.
Co-authored-by: Adam Reichold <[email protected]>
When an array has 0 or 1 elements, strides don't matter anymore. The
general case of this function handled this correctly, but the special
case for ndim == 1 did not.
Originally contributed by @messense in pyo3, copied their solution with
thanks.
Setup ci so that most checks run in merge queue only
Somehow, these take 30m on powerpc, which is too slow (much slower than
anything else.)

Try to use s390x instead and run numeric tests in release mode.
akern40 and others added 30 commits April 10, 2025 00:00
* add test case for empty array

* return early when the array has zero lenth dims

---------

Co-authored-by: Adam Kern <[email protected]>
* draft for inplace reverse, permute

* add test cases

* formatter

* cycle detection logic with bitmask

* formatter

* satisfying CI(cargo doc, etc.)

* add comments from doc, to describe how the logic works
These allow the iterators to act on the lifetime of the data, not the lifetime of the view.
Specifically, deals with CVE-2025-4574, GHSA-4fcv-w3qc-ppgg, and GHSA-255r-3prx-mf99 by updating the lockfile and one set of dependencies for testing serialization.
Simple update, just an edition change in Cargo.toml and a run of `cargo update` with an MSRV-aware resolver.
* Fixes some broken references in the docs

* Raise allowable epsilon errors on logspace and geomspace

For some reason, when Miri runs, we get higher floating point error on these methods.
Also, remove the `if: always()` on the conclusion step of CI so that it doesn't pop up when we just change the `latest-deps.yaml`.
ndarray-rand crate on the main branch uses the workspace rand and
rand_distr versions, which are 0.9 and 0.5 respectively. This commit
documents those versions at ndarray-rand's lib.rs' module level.
The current implementation of ArrayRef and its cousins has them as sized types, which turns out to be a critical and unsound mistake. This PR is large, but its heart is small: change the ArrayRef implementation to be unsized.

The approach this PR takes is to package the core array "metadata" - the pointer, dim, and strides - into a struct that can either be sized or unsized. This is done by appending a generic "_dst_control" field. For the "sized" version of the metadata, that field is a 0-length array. For the "unsized" version of the metadata, that sized field is a struct. This core type is private, so users cannot construct any other variants other than these two.

We then put the sized version into the ArrayBase types, put the unsized version into the reference types, and perform an unsizing coercion to convert from one to the other. Because Rust has no (safe, supported) "resizing" coercion, this switch is irreversible. Sized types cannot be recovered from the unsized reference types.
…1540)

Prior to ndarray 0.17, the RandomExt trait exposed by ndarray-rand contained methods for both creating new arrays randomly whole-cloth (random_using) and sampling from existing arrays (sample_axis_using). With the introduction of reference types in ndarray 0.17, users should be able to sample from ArrayRef instances as well.

We choose to expose an additional extension trait, RandomRefExt, that provides this functionality. We keep the methods on the old trait for backwards compatibility, but collapse the implementation and documentation to the new trait to maintain a single source of truth.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.