We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7daa0e2 commit 00ad788Copy full SHA for 00ad788
src/systems/unit_check.jl
@@ -69,7 +69,9 @@ get_unit(x::Real) = unitless
69
get_unit(x::DQ.AbstractQuantity) = screen_unit(x)
70
get_unit(x::AbstractArray) = map(get_unit, x)
71
get_unit(x::Num) = get_unit(unwrap(x))
72
-get_unit(x::Symbolics.Arr) = get_unit(unwrap(x))
+function get_unit(x::Union{Symbolics.ArrayOp, Symbolics.Arr, Symbolics.CallWithMetadata})
73
+ get_literal_unit(x)
74
+end
75
get_unit(op::Differential, args) = get_unit(args[1]) / get_unit(op.x)
76
get_unit(op::Difference, args) = get_unit(args[1]) / get_unit(op.t)
77
get_unit(op::typeof(getindex), args) = get_unit(args[1])
0 commit comments