Open adienes opened 4 weeks ago
The broadcasted assignment throwing is consistent with how broadcasting works, pretty sure there's nothing to improve on that side.
The =
assignment is really just syntax sugar for setindex!(dst, src, indices...)
. It works as documented as far as I see, as far as I understand it just treats the inputs as iterators.
There's perhaps some redundancy here, but I don't think there's anything to change, at least not before a breaking release. Do you have any suggestions?
consider
A = zeros(2, 2), b = [1,1]
A[1, :] = reshape(b, 1, 2)
A[1, :] .= reshape(b, 1, 2) # ERROR: DimensionMismatch
A[:, 1] = reshape(b, 1, 2)
A[:, 1] .= reshape(b, 1, 2) # ERROR: DimensionMismatch
why do
2, 4
error but not1, 2
? should=
and.=
be pretty much always identical in the case of "standard" dense arrays? if not, what is the difference?