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
julia>@pretty@cast P[i,j,k] := [R[:,:,k] X₁[:,k]][i,j]
begin@boundscheckndims(R) ==3||throw(ArgumentError("expected a 3-tensor R[:, :, k]"))
@boundscheckaxes(R, 3) ==axes(X₁, 2) ||throw(DimensionMismatch("range of index k must agree"))
@boundscheckndims(X₁) ==2||throw(ArgumentError("expected a 2-tensor X₁[:, k]"))
local vicuña =sliceview(R, (:, :, *))
local alligator =sliceview(X₁, (:, *))
local dolphin =@__dot__([vicuña alligator]) # <-- this broadcast does nothinglocal redpanda =lazystack(dolphin)
P = redpanda
end
julia> :([vicuña alligator]) |> dump
Expr
head: Symbol hcat
args:Array{Any}((2,))
1: Symbol vicuña
2: Symbol alligator
julia>@.hcat(1:2, 3:4)
2-element Vector{Matrix{Int64}}:
[13]
[24]
julia>@. [1:23:4]
2×2 Matrix{Int64}:1324
It wouldn't be impossible to make it recognise Expr(:hcat, ...) at some early stage, and convert it to a function call. Likewise vcat, vect... from :([1 2 3; 4 5]) |> dump also row not hvcat? And Float32[1:2 3:4] is typed_hcat. But I haven't done so. Probably writing out hcat is best for now.
What will never work is Vector[1:2, 3:4], as the macro cannot distinguish this from indexing.
This works,
but this does not
It gives the error,
Should it? Thanks!
The text was updated successfully, but these errors were encountered: