Repository navigation
Commit 0745418
fix: export Ranked from the prelude (#1621)
#1575 moved `ndim` off of `Dimension` and onto the new `Ranked`
supertrait. Generic code with a `D: Dimension` bound still works, but
calling `.ndim()` on a concrete dimension type now needs `Ranked` in
scope, so this stopped compiling:
```rust
use ndarray::prelude::*;
Ix2(3, 4).ndim(); // E0599: trait `Ranked` is not in scope
```
This exports `Ranked` from the prelude next to `Dimension`. Code that
imports `ndarray::Dimension` directly, rather than going through the
prelude, still has to import `ndarray::layout::ranked::Ranked` too.
CI is red until #1622 lands. That PR fixes lints from newer toolchains
that also fail on `refactor` itself.
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 643181c commit 0745418
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
0 commit comments