codedthinking / Kezdi.jl

An umbrella of Julia packages for data analysis, in loving memory of Gábor Kézdi
Other
9 stars 0 forks source link

bug: when RHS is vector valued, cannot use `.=` in assignment #81

Closed korenmiklos closed 3 days ago

korenmiklos commented 3 days ago
julia> @generate df y = [1, 2, 3]
ERROR: DimensionMismatch: array could not be broadcast to match destination
korenmiklos commented 3 days ago

This seems to work with [[]] notation:

julia> @generate df x = [[1, 2, 3]]
10×2 DataFrame
 Row │ i      x
     │ Int64  Array…
─────┼──────────────────
   1 │     1  [1, 2, 3]
   2 │     2  [1, 2, 3]
   3 │     3  [1, 2, 3]
   4 │     4  [1, 2, 3]
   5 │     5  [1, 2, 3]
   6 │     6  [1, 2, 3]
   7 │     7  [1, 2, 3]
   8 │     8  [1, 2, 3]
   9 │     9  [1, 2, 3]
  10 │    10  [1, 2, 3]

Need to add discussion about this to the documentation.