You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Julia 0.5, an assignment like a[i] .= ... gets converted by the parser to broadcast!(identity, view(a, i), ...), and moreover the broadcast! loop is automatically merged with broadcast loops from nested "dot" calls (see JuliaLang/julia#17510 and JuliaLang/julia#17546).
It would be nice to support this if a is a DataFrame. My understanding is that it will currently throw an error because view is not implemented for a DataFrame.
I haven't used DataFrames much, but if I understand it correctly then it sounds sufficient to define:
Actually, .= might work with dataframes in many cases already because broadcast! was updated to use a dotview function that defaults to getindex (so that it works as-is with things like dictionaries of array and in general anything where getindex can return a mutable object).
nalimilan
changed the title
implement view(::DataFrame, ...) for compatibility with .= in Julia 0.5
implement view(::DataFrame, ...) to support broadcasted assignment
Sep 20, 2018
In Julia 0.5, an assignment like
a[i] .= ...
gets converted by the parser tobroadcast!(identity, view(a, i), ...)
, and moreover thebroadcast!
loop is automatically merged with broadcast loops from nested "dot" calls (see JuliaLang/julia#17510 and JuliaLang/julia#17546).It would be nice to support this if
a
is a DataFrame. My understanding is that it will currently throw an error becauseview
is not implemented for a DataFrame.I haven't used DataFrames much, but if I understand it correctly then it sounds sufficient to define:
The text was updated successfully, but these errors were encountered: