Skip to content

Commit

Permalink
Add similarterm for array
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Oct 6, 2023
1 parent a206b10 commit d7c0fbe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/arrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ function arguments(a::ArrayOp)
arguments(a.term)
end

function similarterm(a::ArrayOp, f, args, type; metadata=nothing)
res = f(args...)
if res isa Symbolic && metadata !== nothing
res = SymbolicUtils.metadata(res, metadata)
end
res
end

function Base.isequal(a::ArrayOp, b::ArrayOp)
a === b && return true
isequal(a.shape, b.shape) &&
Expand Down

0 comments on commit d7c0fbe

Please sign in to comment.