Skip to content

Commit

Permalink
call _cat_t for better inference
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Jul 19, 2022
1 parent 5e487ec commit bd28d08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/array/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ function Base._cat(catdims::Tuple, Xin::AbstractDimArray...)
cat_dnums = (inserted_dnums..., appended_dnums...)

newrefdims = otherdims(refdims(A1), newcatdims)
newA = Base._cat(cat_dnums, map(data, Xin)...)
T = Base.promote_eltypeof(Xin...)
data = map(parent, Xin)
newA = Base._cat_t(cat_dnums, T, data...)
rebuild(A1, newA, format(newdims, newA), newrefdims)
end
function Base._cat(catdim::DimType, Xin::AbstractDimArray...)
Expand Down

0 comments on commit bd28d08

Please sign in to comment.