Array bounds/contains check?
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
No file or test is named. Start by reading the ArrayBase and Dim APIs around the existing get operation, then determine where a coordinate bounds predicate belongs. Done means Array2 and Array3 coordinates can be checked without accessing an element, with tests covering in-bounds and out-of-bounds coordinates.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I find myself very frequently having a coordinate and an ndarray Array2/Array3. I want to check whether the coordinate is within the bounds of the Array2/Array3 (IE, gte than 0,0,0, less than the array size). There doesn't appear to be a way to do this. There is "get" to return a value or None but that is not the same thing. Sometimes I want to know if the value is inbounds without, at that time, accessing the value.
It would be helpful to add a within(), contains() etc function to ArrayBase (I think adding it to Dim would also serve equivalent purposes).
(If this already exists and I just missed it, sorry)
- 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 ·