Skip to content

Commit

Permalink
Add ndims def in array function registration to help infer Arr type
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenszhu committed Aug 9, 2024
1 parent 3fde06d commit e38bc90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/arrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ end
@register_array_symbolic bar(x::AbstractVector, p::AbstractMatrix) begin
size = size(x)
eltype = promote_type(eltype(x), eltype(p))
ndims = 1
end

@test isequal(substitute(bar(x, p), x => ones(3)), bar(ones(3), p))
Expand Down

0 comments on commit e38bc90

Please sign in to comment.