I think you’re looking for *
not dot
, different languages differ a bit in how they handle various combinations of matrices & vectors.
julia> X = rand(50562,19); θ = rand(19);
julia> dot(θ,θ)
5.91416099980499
julia> dot(X,θ)
ERROR: DimensionMismatch("dot product arguments have lengths 960678 and 19")
julia> size(X * θ)
(50562,)
julia> θ * θ
ERROR: MethodError: no method matching *(::Array{Float64,1}, ::Array{Float64,1})
julia> θ' * θ
5.91416099980499
julia> size(θ')
(1, 19)