Roll array along an axis
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reviewing the crate's existing array-axis and view/indexing APIs, using the np.roll examples as the behavioral reference. Determine how rolling by an axis and signed shift should behave, including wraparound and the central-difference example. Done means the crate exposes equivalent rolling behavior with coverage for the shown two-dimensional cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In numpy you can roll an array along an axis. Which is an index shift with wrap around, meaning, that given an array
a = np.arange(1, 10).reshape(3, 3)
[[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
rolling along the 2nd axis by 1 results in
np.roll(a, 1, 1)
[[3, 1, 2],
[6, 4, 5],
[9, 7, 8]]
I wonder if this can be cheaply implemented in this crate, since it is basically just a remapping of indices? It would be useful to calculate a gradient with periodic boundaries (wrap around). For example, a central difference (modulo prefactors) in y direction can be implemented like
np.roll(a, -1, 1) - np.roll(a, 1, 1)
[[-1, 2, -1],
[-1, 2, -1],
[-1, 2, -1]
- Lingua principale
- Rust
- Stelle
- 4.3k
- Fork
- 391
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-ndarray/ndarray
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
rust-ndarray/ndarray#1612 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
rust-ndarray/ndarray#1617 · 1 commento ·
-
Stack overflow in `triu` Apertabug good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
rust-ndarray/ndarray#1615 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
rust-ndarray/ndarray#1610 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
rust-ndarray/ndarray#1609 ·
Tutte le issue di rust-ndarray/ndarray
Issue simili
-
risk:low runtime status:in-progress type:test
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
EricSpencer00/Resilient#4835 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
cesarferreira/stax#890 ·