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 Language Documentation in section 19.1.2 Construction and Initialization states:
The syntax [A, B, C, ...] constructs a 1-d array (vector) of its arguments.
However, the actual behavior is that it can construct a vector where its arguments get converted to a common promotion type if it exists. For example after:
a = [true, false]
b = [1,2]
c = [a, b]
we have that c[1] is:
2-element Array{Int64,1}:
1
0
and c1[1] === a is false but c[2] === b is true.
Therefore I would suggest to update the documentation in the following way:
The syntax [A, B, C, ...] constructs a 1-d array (vector) of its arguments. If all arguments have a common promotion type then they get converted to that type. In such a situation mutable arguments are stored in the new array by reference only if they do not have to be converted.
The text was updated successfully, but these errors were encountered:
Julia Language Documentation in section 19.1.2 Construction and Initialization states:
However, the actual behavior is that it can construct a vector where its arguments get converted to a common promotion type if it exists. For example after:
we have that
c[1]
is:and
c1[1] === a
is false butc[2] === b
is true.Therefore I would suggest to update the documentation in the following way:
The text was updated successfully, but these errors were encountered: