How to make zip work with more than 6 elements?
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
Rechercherichtung
Start with the Zip::from, .and, and .for_each entry points and the compiler example at src/main.rs:47. Review how support for the existing producer counts is organized, then verify that the seven-producer example compiles and executes with the expected values.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I want to use zip (or azip!) with 7 producers but its only implemented for max 6 producers. Is there a convenient way to also implement it for more producers?
Minimal Example Code:
let v1: Array1<i32> = Array1::zeros(3);
let v2: Array1<i32> = Array1::zeros(3);
let v3: Array1<i32> = Array1::zeros(3);
let v4: Array1<i32> = Array1::zeros(3);
let v5: Array1<i32> = Array1::zeros(3);
let v6: Array1<i32> = Array1::zeros(3);
let v7: Array1<i32> = Array1::zeros(3);
Zip::from(&v1)
.and(&v2)
.and(&v3)
.and(&v4)
.and(&v5)
.and(&v6)
.and(&v7)
.for_each(|v1, v2, v3, v4, v5, v6, v7| {
println!("{}, {}, {}, {}, {}, {}, {}", v1, v2, v3, v4, v5, v6, v7);
});
Error:
error[E0599]: no method named
andfound for structndarray::Zip<(ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>), Dim<[usize; 1]>>in the current scope
--> src\main.rs:47:14
|
47 | .and(&v7)
| ^^^ method not found inndarray::Zip<(ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>), Dim<[usize; 1]>>
|
= note: the method was found for
-ndarray::Zip<(P1,), D>
-ndarray::Zip<(P1, P2), D>
-ndarray::Zip<(P1, P2, P3), D>
-ndarray::Zip<(P1, P2, P3, P4), D>
-ndarray::Zip<(P1, P2, P3, P4, P5), D>
- Vorherrschende Sprache
- Rust
- Sterne
- 4.3k
- Forks
- 391
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rust-ndarray/ndarray
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
rust-ndarray/ndarray#1612 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
rust-ndarray/ndarray#1617 · 1 Kommentar ·
-
Stack overflow in `triu` Offenbug good first issue
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
rust-ndarray/ndarray#1615 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
rust-ndarray/ndarray#1610 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
rust-ndarray/ndarray#1609 ·
Alle Issues in rust-ndarray/ndarray
Ähnliche Issues
-
risk:low runtime status:in-progress type:test
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
bevyengine/bevy#25861 ·