Fun with kwargs methods

zerosM(dim; like::AbstractArray=Vector{Float64}()) = zeros(eltype(like), dim, dim)

should do what you want.

3 Likes