JuliaSIMD / JuliaSIMD/LoopVectorization.jl
@turbo with passmissing?
- Vorherrschende Sprache
- Julia
- Sterne
- 789
- Forks
- 73
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I've been using `FastBroadcast` and `@turbo` to speed up broadcasting operations in DataFrames. However, missing values are quite common when you work with a DataFrame, and `@turbo` throws an error in that case.
Is it possible to have something similar to `passmissing` for `@turbo`? This would be consistent with Base broadcast and as FastBroadcast works, which passes missing values when you broadcast.
```julia
using LoopVectorization, FastBroadcast
df = DataFrame(a = [1,missing,3])
@.. df.a .* df.a # this works
@turbo df.a .* df.a # this throws error
```
The error is:
```julia
ERROR: MethodError: no method matching vmaterialize!(::Vector{Union{Missing, Int64}},
::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(*),
Tuple{Vector{Union{Missing, Int64}}, Vector{Union{Missing, Int64}}}},
::Val{:Main}, ::Val{(true, 0, 0, 0, true, 0, 32, 15, 64, 0x0000000000000001, 1, true)}, ::Val{((true,), (true,))})
```
The problem persists if you create a view dropping missings, since the vector is still Union{Missing,T} and is not allowed.
Many thanks!!! Great package!!!
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start with the @turbo broadcast path and the reported vmaterialize! MethodError, using the Julia example with a Vector{Union{Missing, Int64}} as the reproduction. Determine how passmissing-like behavior should work for @turbo, then verify that the example propagates missing values instead of throwing while preserving existing broadcast behavior.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- julia
- Bereich
- performance
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100