@@ -399,10 +399,10 @@ end
399399
400400# # Constructors ##
401401
402- similar (a:: Array{T,1 } ) where {T} = Vector {T} (undef, size (a,1 ))
403- similar (a:: Array{T,2 } ) where {T} = Matrix {T} (undef, size (a,1 ), size (a,2 ))
404- similar (a:: Array{T,1 } , S:: Type ) where {T} = Vector {S} (undef, size (a,1 ))
405- similar (a:: Array{T,2 } , S:: Type ) where {T} = Matrix {S} (undef, size (a,1 ), size (a,2 ))
402+ similar (a:: Vector{T } ) where {T} = Vector {T} (undef, size (a,1 ))
403+ similar (a:: Matrix{T } ) where {T} = Matrix {T} (undef, size (a,1 ), size (a,2 ))
404+ similar (a:: Vector{T } , S:: Type ) where {T} = Vector {S} (undef, size (a,1 ))
405+ similar (a:: Matrix{T } , S:: Type ) where {T} = Matrix {S} (undef, size (a,1 ), size (a,2 ))
406406similar (a:: Array{T} , m:: Int ) where {T} = Vector {T} (undef, m)
407407similar (a:: Array , T:: Type , dims:: Dims{N} ) where {N} = Array {T,N} (undef, dims)
408408similar (a:: Array{T} , dims:: Dims{N} ) where {T,N} = Array {T,N} (undef, dims)
@@ -1832,12 +1832,12 @@ julia> insert!(Any[1:6;], 3, "here")
18321832 6
18331833```
18341834"""
1835- function insert! (a:: Array{T,1 } , i:: Integer , item) where T
1835+ function insert! (a:: Vector{T } , i:: Integer , item) where T
18361836 @_propagate_inbounds_meta
18371837 item = item isa T ? item : convert (T, item):: T
18381838 return _insert! (a, i, item)
18391839end
1840- function _insert! (a:: Array{T,1 } , i:: Integer , item:: T ) where T
1840+ function _insert! (a:: Vector{T } , i:: Integer , item:: T ) where T
18411841 @_noub_meta
18421842 # Throw convert error before changing the shape of the array
18431843 _growat! (a, i, 1 )
0 commit comments